diff options
author | EvilSeph <evilseph@gmail.com> | 2012-10-29 01:45:08 -0400 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-10-29 01:45:08 -0400 |
commit | f28f674a3d06a25eae404226e9d55def07354adf (patch) | |
tree | dfe9e85ac873717be886ec1f97e75687462e5e72 /src/main | |
parent | a446bb7e8f2f84af21f3c38ba1531df2a7a7cb32 (diff) | |
download | bukkit-f28f674a3d06a25eae404226e9d55def07354adf.tar bukkit-f28f674a3d06a25eae404226e9d55def07354adf.tar.gz bukkit-f28f674a3d06a25eae404226e9d55def07354adf.tar.lz bukkit-f28f674a3d06a25eae404226e9d55def07354adf.tar.xz bukkit-f28f674a3d06a25eae404226e9d55def07354adf.zip |
Add isHardcore API to check if the server is in hardcore mode or not. Adds BUKKIT-2707
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/Bukkit.java | 4 | ||||
-rw-r--r-- | src/main/java/org/bukkit/Server.java | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java index 1d0fa1c3..56f091aa 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -243,6 +243,10 @@ public final class Bukkit { return server.getAllowFlight(); } + public static boolean isHardcore() { + return server.isHardcore(); + } + public static void shutdown() { server.shutdown(); } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java index 361ad17d..54cb1d94 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -476,6 +476,13 @@ public interface Server extends PluginMessageRecipient { public boolean getAllowFlight(); /** + * Gets whether the server is in hardcore mode or not. + * + * @return Whether this server is in hardcore mode or not. + */ + public boolean isHardcore(); + + /** * Gets whether to use vanilla (false) or exact behaviour (true). * * Vanilla behaviour: check for collisions and move the player if needed. |