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

Conversation

sh0inx
Copy link
Contributor

@sh0inx sh0inx commented Jun 15, 2024

honestly cant believe it was a one line fix smh

honestly cant believe it was a one line fix smh
@@ -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

@PeachesMLG PeachesMLG closed this Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants