Implemented getOperators

Dieser Commit ist enthalten in:
Dinnerbone 2011-09-25 03:28:00 +01:00
Ursprung cb49379b24
Commit ceba082703
2 geänderte Dateien mit 11 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -35,7 +35,7 @@ public class ServerConfigurationManager {
public int maxPlayers; // CraftBukkit - private -> public public int maxPlayers; // CraftBukkit - private -> public
public Set banByName = new HashSet(); // CraftBukkit - private -> public public Set banByName = new HashSet(); // CraftBukkit - private -> public
public Set banByIP = new HashSet(); // CraftBukkit - private -> public public Set banByIP = new HashSet(); // CraftBukkit - private -> public
private Set operators = new HashSet(); public Set operators = new HashSet(); // CraftBukkit - private -> public
private Set whitelist = new HashSet(); private Set whitelist = new HashSet();
private File j; private File j;
private File k; private File k;

Datei anzeigen

@ -26,7 +26,6 @@ import java.util.HashSet;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Random;
import java.util.UUID; import java.util.UUID;
import java.util.Set; import java.util.Set;
import java.util.logging.Level; import java.util.logging.Level;
@ -836,6 +835,16 @@ public final class CraftServer implements Server {
return result; return result;
} }
public Set<OfflinePlayer> getOperators() {
Set<OfflinePlayer> result = new HashSet<OfflinePlayer>();
for (Object name : server.operators) {
result.add(getOfflinePlayer((String)name));
}
return result;
}
public void reloadWhitelist() { public void reloadWhitelist() {
server.reloadWhitelist(); server.reloadWhitelist();
} }