diff --git a/src/main/java/xyz/etztech/qol/commands/CheckupCommand.java b/src/main/java/xyz/etztech/qol/commands/CheckupCommand.java index e6ddcc5..2413d9e 100644 --- a/src/main/java/xyz/etztech/qol/commands/CheckupCommand.java +++ b/src/main/java/xyz/etztech/qol/commands/CheckupCommand.java @@ -29,11 +29,12 @@ public class CheckupCommand implements CommandExecutor { public static void join(Player player) { Checkup checkup; + checkup: for (UUID uuid : checkups.keySet()) { checkup = checkups.get(uuid); for (Player pl : checkup.players) { if (pl.getUniqueId().equals(player.getUniqueId())) { - continue; // Don't check twice, even if they re-logged + continue checkup; // Don't check twice, even if they re-logged } } checkup.players.add(player); @@ -104,10 +105,11 @@ public class CheckupCommand implements CommandExecutor { Checkup checkup = checkups.get(player.getUniqueId()); Player next; while (checkup.hasNext()) { - // Loop until current player is online + // Loop until next player is online next = checkup.next(); if (next.isOnline()) { player.teleport(next.getLocation()); + EtzTechUtil.sms(player, ChatColor.GREEN + "You are now checking on " + ChatColor.YELLOW + next.getName()); checkups.put(player.getUniqueId(), checkup); return; } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index bfdc19c..10c41d1 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -43,6 +43,8 @@ commands: karattrophy: description: 24 karat trophy command aliases: [trophy] + checkup: + description: Checkup command permissions: qol.admin: description: Ability to reload the plugin @@ -77,6 +79,9 @@ permissions: qol.karattrophy: description: Ability to use the Karat Trophy Command default: op + qol.checkup: + description: Ability to use the Checkup Command + default: op qol.auditable: description: Audits command usage default: op