Hey there
I am trying to give the player an item when he logs in/creates a new world.
I have posted my code below
@Override
public void onPlayerLogin(EntityPlayer player) {
EntityPlayer player1 = ((EntityPlayer)MinecraftServer.getServer().getConfigurationManager().playerEntityList.get(0));
player1.inventory.addItemStackToInventory(new ItemStack(Item.arrow,1));
}
This is not working, I have put it in my Savehandler, tickhandler and my main mod file with no sucsess
Anyway I could do that? IF you can reply with the answer, thanks in advance!