Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by Dantesudante, Aug 20, 2017.
It give me this error
You created your own EntityPlayer class in testlingua packpage. getHandle() returns you the NMS EntityPlayer class, you need to extend it to convert to your EntityPlayer version with cast.
What about that?
Why are you even getting the NMS class file just for the UUID? Use player.getUniqueID. Also, not sure how... but you've imported a class that doesn't exist. "net.minecraft.entity.player.EntityPlayer" does not exist.
Because if I import the class EntityPlayer it gives me this error:
Basic Java... that error tells you word per word what the problem is. You're trying to cast minecraft's EntityPlayer with your custom EntityPlayer. You need to import minecraft's EntityPlayer.
But as I was saying, you don't even need the EntityPlayer. Change entityPlayer.getUniqueID() to player.getUniqueID() and skip the minecraft's EntityPlayer because it's a waste of time.