Solved Particles

Discussion in 'Plugin Development' started by ollinator01, Sep 24, 2016.

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

    ollinator01

    Hey, i got an problem and dont know how to fix it.
    http://pastebin.com/758sKE8S
    The public void onEnable doesnt work and the public void toggle.

    Greetings
     
  2. Offline

    JanTuck

    Remove override from onEnable
    and completely remove onCommand, since it is surrounding the onEnable.
    Why havent you noticed that error?



    And you have to register the Listener, this means the main class have to implement the Listener like so
    Code:java
    1.  
    2. public class InventoryCloseEvent implements Listener {
    3.  

    Register Listener.
    Bukkit#getPluginManager()
    PluginManager#registerEvents(Listener,plugin)
     
  3. Offline

    ollinator01

  4. Offline

    JanTuck

    You dont register the Listener. You forgot to implement Listener.


    Please learn a bit of java or atleast watch some tutorials before creating help topics.

    Sent from Tapatalk
     
  5. You should too a little bit :D

    The @Override annotation is not necessary and doesn't affect how the code get's executed at all, but it shows you an error if you override a method that doesn't exist in the superclass (e.g. onEnabled)
    Could've removed onEnable at all because it's empty

    And @ollinator01 shouldn't learn a bit of java, he should learn A LOT. I mean wtf, wrong syntax, wrong naming conventions, no understanding of java at all.

    Probably just copy-pasted if from a youtuber that doesn't know how to do it as well

    @ollinator01 how to solve your problem in 3 easy steps:
    1. delete the project
    2. learn java
    3. create the project again
     
  6. Offline

    JanTuck

    You are right about the @Override but since i dont use it at all i wasnt certain.... Sry ;)

    Sent from Tapatalk
     
  7. Offline

    ollinator01

    @FisheyLP
    Hmm ok, i have ordered a book and learn a little bit ^^ I will close this thread :D
     
Thread Status:
Not open for further replies.

Share This Page