Help with PlayerInventory.setContents(ItemStack[] arg0)

Discussion in 'Plugin Development' started by jjd2022, Feb 7, 2011.

Thread Status:
Not open for further replies.
  1. Offline


    Hello everybody. I have recently started to make some pretty basic plugins for my private server. I am currently working on a plugin that when you die to lava it stores the inventory of the player that died in a global variable of type ItemStack[]. However in the onPlayerRespawn() function I can not seem to get PlayerInventory.setContents() to work.

    This is my onPlayerRespawn()

    public void onPlayerRespawn(PlayerRespawnEvent event)
    Player player = event.getPlayer();
    //player.sendMessage("in respawn function");
    PlayerInventory pI = event.getPlayer().getInventory();
    tempStack = null;

    I have a feeling it's because for some reason it will not let me register the event PLAYER_RESPAWN.
    I would appreciate any help :).
Thread Status:
Not open for further replies.

Share This Page