Prevent repeating certain challenge types.

This commit is contained in:
Len 2024-04-12 14:33:05 +02:00
parent 7bec99b78e
commit 528c15db9b

View File

@ -84,6 +84,9 @@ public class ChallengesGUI extends GUIInventory {
takeItems = true;
}
case ON_ISLAND -> {
if (repeat) {
return;
}
if (!player.getWorld().getUID().equals(island.islandUUID())) {
player.sendRichMessage(CometSkyBlockPlugin.instance().messagesConfiguration().get().island().notOnIsland());
return;
@ -99,6 +102,9 @@ public class ChallengesGUI extends GUIInventory {
}
}
case ISLAND_LEVEL -> {
if (repeat) {
return;
}
hasRequirements = island.level() >= challenge.requiredLevel();
if (!hasRequirements) {
player.sendRichMessage("<red>You do no have the required island level.");