Solved Question

Discussion in 'Plugin Development' started by da_Do, May 14, 2016.

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

    da_Do

    What's bad on this ?
    Thank you
     

    Attached Files:

  2. Offline

    I Al Istannen

    @da_Do
    Hovering over the errors shows what's up with it. But it won't work anyways. You need to declare the map OUTSIDE of the onCommand, else a new map will be created every time the command is run. This totally destroys the cooldown concept. Also you never intialize it, so the next one probably points out a null pointer exception, as the Map can only be null at this point.
     
  3. Offline

    Kage0x3B

    Please learn Java before trying to make Bukkit plugins.
    You forgot to close the if clause, I guess you didn't import the Map interface, you didn't initialize the cooldowns map (and it shouldn't be created everytime a player executes a command so the values don't get reset), there is no variable named PlayerName and I could go on for quite some time with other mistakes...

    @I Al Istannen I think we should stop helping him, he obviously hasn't learned even the basics (He has no closing brackets)
     
    I Al Istannen likes this.
  4. Offline

    da_Do

    @Aj Al Istannen so what i must do ? sorry , but i am not good in eng ,, so can u help me with write it ?
    ty
     
  5. Offline

    I Al Istannen

    @da_Do
    I don't want to come across as rude, but you should really, really learn Java first. Bukkit is written in Java and it will only come back to bite you if you don't know at least some Java.
     
Thread Status:
Not open for further replies.

Share This Page