CraftPlayer help

Discussion in 'Spigot Plugin Development' started by Dantesudante, Aug 20, 2017.

  1. [​IMG]

    It give me this error
  2. try replacing
    Code (Text):
    Code (Text):
    • Agree Agree x 1
  3. 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.
  4. [​IMG]

    What about that?
  5. 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.
  6. Because if I import the class EntityPlayer it gives me this error:
  7. 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.
  8. [​IMG]