From 62d73c83ffcb3424d106833a3ee6987e5a67cdea Mon Sep 17 00:00:00 2001 From: Peaches_MLG Date: Sat, 21 Oct 2023 12:27:29 +0100 Subject: [PATCH] boop --- .../com/iridium/iridiumskyblock/commands/RegenCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/iridium/iridiumskyblock/commands/RegenCommand.java b/src/main/java/com/iridium/iridiumskyblock/commands/RegenCommand.java index efdd82db8..d889bd84b 100644 --- a/src/main/java/com/iridium/iridiumskyblock/commands/RegenCommand.java +++ b/src/main/java/com/iridium/iridiumskyblock/commands/RegenCommand.java @@ -23,7 +23,7 @@ public RegenCommand() { @Override public boolean execute(User user, Island island, String[] args, IridiumTeams iridiumTeams) { Player player = user.getPlayer(); - if (args.length == 0) { + if (args.length == 0 && IridiumSkyblock.getInstance().getSchematics().schematics.entrySet().size() > 1) { if (!IridiumSkyblock.getInstance().getIslandManager().getTeamPermission(island, IridiumSkyblock.getInstance().getUserManager().getUser(player), "regen")) { player.sendMessage(StringUtils.color(IridiumSkyblock.getInstance().getMessages().cannotRegenIsland .replace("%prefix%", IridiumSkyblock.getInstance().getConfiguration().prefix) @@ -36,7 +36,7 @@ public boolean execute(User user, Island island, String[] args, IridiumTeams schematic = IridiumSkyblock.getInstance().getSchematics().schematics.keySet().stream() - .filter(config -> config.equalsIgnoreCase(args[0])) + .filter(config -> IridiumSkyblock.getInstance().getSchematics().schematics.entrySet().size() == 1 || config.equalsIgnoreCase(args[0])) .findFirst(); if (!schematic.isPresent()) { player.sendMessage(StringUtils.color(IridiumSkyblock.getInstance().getMessages().unknownSchematic