Code review

Discussion in 'Spigot Plugin Development' started by Pinkpig58, Jun 15, 2016.

  1. Could someone please have a look at this code to see what I've done wrong.

    Eclipse is coming up with errors.
  2. You're naming your ItemMeta object the same as your compass...
  3. Gocha! It's removed a few errors, but now setDisplayName and onPlayerJoin come up with errors. What's the issue there?
  4. ...or, to put it more kindly (since we were all beginners once) -- the information Eclipse has given you should be enough to solve your problem. The "undefined method..." error you're getting on line 6 means exactly what it says. You cannot call #setDisplayName on your "compass" variable. So you should look into where you assign that variable and what type it is.