title: How to reference an EntityPlayer method in a class
body: <p>I am trying to program a minecraft server, but I need to access the getCurrentActiveItem(or something like that) method from the EntityPlayer class. The reason for needing to do this is to have an item in hand do something like heal the player or something. The problem is, <strong>Nothing is static.</strong> I learned to code from a program called youth Digital, and they don't allow me to edit any code that was not created by me, so I cannot just put static on this method. I did some research and found some pretty specific answers. They were about making a new instance of a class, I guess. Putting it in the code just gives me an error. I have tried stuff like this:</p>
  
  <pre><code>EntityPlayer player = new EntityPlayer.class;
  public class player = new EntityPlayer.class;
  class player = player.instanceOf("EntityPlayer.class");
  </code></pre>
  
  <p>and other similar stuff. All gave me an error that I am not advanced enough to decipher. Here is my code:</p>
  
  <pre><code>package myservermod;
  
  import com.youthdigital.servermod.game.*;
  
  public class Player extends PlayerData {
  
    public Player(EntityPlayer parPlayerObject) {
      super(parPlayerObject);
    }
  
    @Override
    public void onUpdate() {
  /*Cheats*/
     //Teleport Cheat
     if(Conditions.cheatEntered("teleport")){
       Actions.teleportPlayers(GameManager.getStringFromCheat(1));
     }
  /*Red Team*/
     //Enter the Red Team
     if(Conditions.didRightClickBlock("redTeamEntrance")){
       Actions.teleportPlayers("redTeamBase");
     }
      if(Conditions.didRightClickBlock("dirtBlockBuy")){
        Actions.setBlockWithMetaAtPos("redDirtButton" , Blocks.stone_button, 3);
      }
    }
  
    @Override
    public void onJoinedServer(){
      Actions.teleportPlayers("lobby");
    }
  
    @Override
    public void onStartGame() {
  
    }
  
    @Override
    public void onResetGameToLobby() {
      Actions.teleportPlayers("lobby");
    }
  
    @Override
    public void onRespawned() {
  
    }
  
  }
  </code></pre>