Help/Problem With Tp Plugin.

Discussion in 'Plugin Development' started by coolkid20112012, Jan 3, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    coolkid20112012

  2. @coolkid20112012 Why does PlayerListener extend JavaPlugin?
    Why does Main implement Listener?
     
  3. Offline

    coolkid20112012

    PlayerListener Extends JavaPlugin Because if it doesnt it getConfig() doesnt work.
    And im not sure why main implements Listener @DJSkepter
     
  4. Offline

    mythbusterma

    @coolkid20112012

    Can't have more than one class in your plugin extend JavaPlugin. Invoke getConfig() on the instance of your class that does extend it if you need to access the config.
     
  5. Offline

    coolkid20112012

    @mythbusterma Okay And Im Faily New At This So Could You Like Change The Code And Post It In Pastebin.com And Tell me What You Did Or Explain A Little More Simpler Thanks :)
     
  6. Offline

    timbragg12

    @coolkid20112012 Not the reason it didn't work but you didn't register your listener either.
     
  7. Offline

    mythbusterma

    @coolkid20112012

    Nothing I said was difficult to understand, do you have any questions specifically? Also please stop typing in altcaps.
     
    AdamQpzm likes this.
  8. Offline

    coolkid20112012

    I Fixed The Issue But I Have Another Issue Now, I Load The Server Up And Plugin Works No Errors, I Even Do /help HybridCore And It Shows All Commands Successfully. But when i do /mute, /ban or any other command that is in the plugin it says and does nothing.., All it does is log the command in the console but doesnt show an error there either...
    Any Help?
     
  9. Offline

    mythbusterma

    @coolkid20112012

    Considering, according to the code above you never implemented those commands, that isn't at all surprising.
     
  10. Offline

    coolkid20112012

    No onced i fixed the plugin i added commands in it worked but then all of a sudden it stopped working?
     
  11. Offline

    nverdier

    @coolkid20112012 You must have changed something for it to stop working. What did you change?
     
  12. Offline

    Permeer

    In the main class , at " if(command.equalsIgnoreCase("tp")) " put a {

    " if(command.equalsIgnoreCase("tp")){ "


    Int the PlayerListener class, at "if(getConfig().getString("Join Message.").equalsIgnoreCase("")){"

    remove the "." at "Join Message." and put " equalsIgnoreCase(" ")) " insteadof " equalsIgnoreCase("")) "
     
  13. Offline

    mythbusterma

    @Permeer

    So you expect us to magically tell you why commands aren't working for you without you posting any related code?
     
Thread Status:
Not open for further replies.

Share This Page