Does OnNpcAddSaddleEvent Work?

  • angriff

    Changed the title of the thread from “Does OnNpcAddSaddlEvent Work?” to “Does OnNpcAddSaddleEvent Work?”.
  • yes it works. did you add the @EventMethod above the method?

    yes I did. it stops my other routines from working. Anyway I am trying a different routine and avoiding this method. Been fighting that one to long


    Just for discussion now, did you when you got it to work ---- public void OnNpcAddSaddle(NpcAddSaddleEvent evt) { --- to capture who is doing it and to what npc?

  • I am just going to start a new project and try to copy paste the code. Been fighting this for days now. If I worked for me as a programmer I would fire me.


    I mean it stops the other routines from working. I had a weird thing I did not understand. In the register listener () I had a red this. When I retyped it it turned blue. Not sure what that was in netbeans.

  • I am just going to start a new project and try to copy paste the code. Been fighting this for days now. If I worked for me as a programmer I would fire me.


    I mean it stops the other routines from working. I had a weird thing I did not understand. In the register listener () I had a red this. When I retyped it it turned blue. Not sure what that was in netbeans.

    do you have discord? I'm more than willing to help you out it's just hard to understand in the forums. When u make a new project you have to create a resources folder and place a plugin.yml file in it. The yml file tells the server where where to start sorta like the main method. Also you have to implement Listener and register the event Listener in the onenable method.

  • I appreciate that. I do have discord. But for now i am going to try this thing. I had to retype the if(def.type == Npcs.Type.Mount) line to get it to stop flagging me. Funny the old routine needed one more import than the new one to get the flags to go away.

    I have already converted several of my routines and added a new one so I am not totally lost on what it should look like but this one is killing me.


    It stops all the routines from working and it will not work on its own. Hopefully this clean build will get rid of whatever got transferred over. I will DM you if we i decide to take you up on Discord screen share.

  • Here is a stupid question. In the YML file does it matter if the file name is first letter capitalized.lowercase or the directory is on the server? Seems I have a few that have them reversed but they seem to work?

  • OMG ;(:wacko::angry::poo: So many issues. I kept looking for a stupid syntax error and it was the .yml file after all. :angry::angry::angry: You look at something and look at it and dont see it.


    The .yml file was written with the main and the capitalization reversed the MAIN line between the package and the path. I am sure it was the same problem with the original method I was trying that really I liked better.


    Guys please dont laugh too hard..


    I should put a warning on this thread to not be drinking coffee when you read it. You might spit it all over you screen when you read this. :lol:

  • From the JAVA version forums Getting Started. Create a Plugin

    (the path to your main class, including the full package name)


    name: MyPlugin

    main: net.mypackage.myplugin.MyPlugin

    version: 1.0.0

    author: <your name>

    team: <your team, optional>

    description: "Put your description here"

    license: MIT

    website: http://www.myhomepage.com



    Thanks for all your help and suggestions. It did help me clean up some of the code. I am glad NetBeans saves history as I almost deleted the first routine Method that looked like it would work but frustrated me because of what turns out a typo in the .YML file.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!