Prevent repeating certain challenge types.
This commit is contained in:
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user