EnderContainers icon indicating copy to clipboard operation
EnderContainers copied to clipboard

How to delete contents?

Open Blaxor opened this issue 4 years ago • 1 comments

Hello . I need to make an little implimentation of this plugin in my plugin. And i can`t find how i can delete the items from the endercontainers of a player. Can you help me please?

Blaxor avatar May 07 '21 09:05 Blaxor

I try this but it dont work. Any other ideas? ( I know that i have max 9 enderchests , it depends on rank of player. with each max 3 rows). EnderChestManager manager = Managers.get(EnderChestManager.class); manager.loadPlayerContext(event.getPlayerOBUUID(), playerContext -> { int chests = playerContext.getAccessibleChestCount(); for (int i = 0; i < 9; i++) { playerContext.getChest(i).get().getContents().clear(); } playerContext.save(); });

Blaxor avatar May 07 '21 09:05 Blaxor