-1

I'm am making a plugin and I need to import org.bukkit.entity.player, but whenever i type it into eclipse with bukkit 1.13.2, it gives an error about there is no player class in org.bukkit.entity. How do I fix this?

nullminer
  • 19
  • 5
  • 1
    Are you sure it isn't `org.bukkit.entity.Player`? Also, IIRC, you're able to use Player and then ask Eclipse to import it for you. – TheOnlyMrCat Jun 02 '19 at 22:57
  • @TheOnlyMrCat I did that, and i let eclipse do it for me, but it still doesn't work – nullminer Jun 02 '19 at 23:00
  • Cannot reproduce, latest javadoc still shows the existence of the class: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/Player.html – vandench Jun 02 '19 at 23:30
  • This question is also very much off topic for SO, you’d probably be much better off directly asking them on their forum or their IRC: https://www.spigotmc.org/pages/irc/ – vandench Jun 02 '19 at 23:31
  • That's weird, it says import org.bukkit.entity.Player couldn't be resolved – nullminer Jun 04 '19 at 01:33

2 Answers2

0

Sorry for The late reply But there's one easy way to find out the correct package of "Player": Just type in your class body or somewhere else "Player" and hit Ctrl+Space. Then Eclipse shows up all possible Player Classes(I guess there is only only one). Select The Player and hit enter, and eclipse automaticly Imports The Player class

Sorry for my Bad english ;)

Martin
  • 1
  • 1
0

Is your class-path right? Have you added the jar to the project settings in eclipse or the dependency to pom.xml if using maven?

Because the javadocs explicitly states that the class is present: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Player.html.

VaiTon
  • 371
  • 2
  • 11