forked from Minecraft/QoL
parent
c71f388748
commit
c191aad9cc
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue