EnderContainers

EnderContainers

2.5k Downloads

How to delete contents?

Blaxor opened this issue ยท 1 comments

commented

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?

commented

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(); });