summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/bukkit/Bukkit.java4
-rw-r--r--src/main/java/org/bukkit/OfflinePlayer.java14
-rw-r--r--src/main/java/org/bukkit/Server.java7
3 files changed, 25 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 9ad8de08..dd601dcf 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -240,4 +240,8 @@ public final class Bukkit {
public static void unbanIP(String address) {
server.unbanIP(address);
}
+
+ public Set<OfflinePlayer> getBannedPlayers() {
+ return server.getBannedPlayers();
+ }
}
diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java
index ffb32ee9..469e54dc 100644
--- a/src/main/java/org/bukkit/OfflinePlayer.java
+++ b/src/main/java/org/bukkit/OfflinePlayer.java
@@ -16,4 +16,18 @@ public interface OfflinePlayer extends ServerOperator {
* @return Player name
*/
public String getName();
+
+ /**
+ * Checks if this player is banned or not
+ *
+ * @return true if banned, otherwise false
+ */
+ public boolean isBanned();
+
+ /**
+ * Bans or unbans this player
+ *
+ * @param banned true if banned
+ */
+ public void setBanned(boolean banned);
}
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 036ec47e..9467d749 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -407,4 +407,11 @@ public interface Server {
* @param address IP address to unban
*/
public void unbanIP(String address);
+
+ /**
+ * Gets a set containing all banned players
+ *
+ * @return Set containing banned players
+ */
+ public Set<OfflinePlayer> getBannedPlayers();
}