first try the function getEnderInventory(); from player then clear using the clear() function; if it still doesn't work, try looking again at your code, is there a variable that holds the item to be set into the ender inventory