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

Added slot removal option to island menu #868

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public void noArgsDefault(@NotNull CommandSender commandSender) {
Player player = (Player) commandSender;
User user = IridiumSkyblock.getInstance().getUserManager().getUser(player);
if (IridiumSkyblock.getInstance().getTeamManager().getTeamViaID(user.getTeamID()).isPresent()) {

IridiumSkyblock.getInstance().getInventories().islandMenu.items.values().removeIf(item -> item.slot == -1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this will remove the thing from the config, if the slot is -1.

Alternitavly you can also add an if statement here https://github.com/Iridium-Development/IridiumTeams/blob/master/src/main/java/com/iridium/iridiumteams/gui/InventoryConfigGUI.java#L36
So we just dont add it to the GUI if the slot is < 0.

I dont really know what the better solution is here, I guess it really just depends on if we want it to be deleted from the config or not

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not really fussed either way, so ive approved this and ill let you decide on which one you want to go for

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would rather use this, you can go ahead and close this pr in favor of teams

player.openInventory(new InventoryConfigGUI(IridiumSkyblock.getInstance().getInventories().islandMenu).getInventory());
return;
}
Expand Down
Loading