CraftPlayer not found?

Discussion in 'Spigot Plugin Development' started by Bolt, May 19, 2015.

  1. I'm looking at some methods which include the class CraftPlayer. I don't think it's in Spigot and according to my research, it's in craftbukkit, however, some people have used this in Spigot plugins. I was wondering if I simply need to import the craftbukkit jar as a library or something else. What worries me is that it might cause errors at runtime if the server owner uses spigot and not craftbukkit.
  2. I may say this wrong so feel free to correct me, but Spigot includes CraftBukkit. It's a far improved modification of CraftBukkit.

    So the CraftPlayer class can be found in both Spigot and CraftBukkit.
  3. @CraftedFury if it is built into the spigot jar itself, why is it that eclipse does not recognize it? Is there something I need to do? Or should I just try updating my spigot jar?
  4. Be sure to use the spigot jar youd use for running your server. It should contain the class CraftPlayer. No need to update as it was there right from the beginning.
  5. You probly are currently using the spigot-api jar as dependency. Add the spigot.jar dependency AFTER the spigot-api dependency.