Skip to content

Commit

Permalink
boop
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachesMLG committed Oct 21, 2023
1 parent cb7f957 commit 62d73c8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public RegenCommand() {
@Override
public boolean execute(User user, Island island, String[] args, IridiumTeams<Island, User> 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)
Expand All @@ -36,7 +36,7 @@ public boolean execute(User user, Island island, String[] args, IridiumTeams<Isl
}

Optional<String> 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
Expand Down

0 comments on commit 62d73c8

Please sign in to comment.