Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to delete contents? #142

Open
Blaxor opened this issue May 7, 2021 · 1 comment
Open

How to delete contents? #142

Blaxor opened this issue May 7, 2021 · 1 comment
Labels
type: question Questions regarding the use of EnderContainers.

Comments

@Blaxor
Copy link

Blaxor commented May 7, 2021

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 Blaxor added the type: question Questions regarding the use of EnderContainers. label May 7, 2021
@Blaxor
Copy link
Author

Blaxor commented May 7, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Questions regarding the use of EnderContainers.
Projects
None yet
Development

No branches or pull requests

1 participant