From 36b341bfc80f87f313bdfc3952b3449ae7601707 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sun, 25 Sep 2011 03:28:00 +0100 Subject: [PATCH] Implemented getOperators By: Dinnerbone --- .../main/java/org/bukkit/craftbukkit/CraftServer.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 84275c016a..8bb53fc3a4 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -26,7 +26,6 @@ import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import java.util.Random; import java.util.UUID; import java.util.Set; import java.util.logging.Level; @@ -836,6 +835,16 @@ public final class CraftServer implements Server { return result; } + public Set getOperators() { + Set result = new HashSet(); + + for (Object name : server.operators) { + result.add(getOfflinePlayer((String)name)); + } + + return result; + } + public void reloadWhitelist() { server.reloadWhitelist(); }