Jump to content

Recommended Posts

Posted

I've been using:

 

EntityPlayer player = (EntityPlayer)event.entity;

or:    EntityPlayer player = Minecraft.getMinecraft().thePlayer;

 

in my code, but when I try to test it on a server, I get an error on this line in my main class:

 

public static final KeyHandlerEvents keyBinding = new KeyHandlerEvents();

 

saying:      java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityClientPlayerMP

 

The content of that class is in the spoiler at the bottom.

 

The rest of the error is here if it matters:

 

  Reveal hidden contents

 

Before I added anything that uses EntityPlayer player = (EntityPlayer)event.entity; or EntityPlayer player = Minecraft.getMinecraft().thePlayer; it worked fine on servers, and in single player it works perfectly fine as it is now, so how exactly do I reference the player on a server if not either of those?

 

The class it's pointing at now is this if someone needs to see the whole thing. There's probably other places, but I can't check until this one passes startup:

 

  Reveal hidden contents

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.