From c191aad9cce5d8714417ec852587e71e2e40cc3c Mon Sep 17 00:00:00 2001 From: Etzelia Date: Fri, 20 Sep 2019 21:17:18 -0500 Subject: [PATCH] Fix some bugs Signed-off-by: Etzelia --- src/main/java/xyz/etztech/qol/commands/CheckupCommand.java | 6 ++++-- src/main/resources/plugin.yml | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) 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