From 132186672491060562517a88b8cf9aa591d71a52 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Mon, 29 Oct 2012 01:45:08 -0400 Subject: [PATCH] Add isHardcore API to check if the server is in hardcore mode or not. Adds BUKKIT-2707 By: EvilSeph --- paper-api/src/main/java/org/bukkit/Bukkit.java | 4 ++++ paper-api/src/main/java/org/bukkit/Server.java | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/Bukkit.java b/paper-api/src/main/java/org/bukkit/Bukkit.java index 1d0fa1c36c..56f091aab8 100644 --- a/paper-api/src/main/java/org/bukkit/Bukkit.java +++ b/paper-api/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/paper-api/src/main/java/org/bukkit/Server.java b/paper-api/src/main/java/org/bukkit/Server.java index 361ad17d0b..54cb1d9444 100644 --- a/paper-api/src/main/java/org/bukkit/Server.java +++ b/paper-api/src/main/java/org/bukkit/Server.java @@ -475,6 +475,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). *