From 060128b9d6b4a123e3e95a30a14d32928925406f Mon Sep 17 00:00:00 2001 From: GeorgH93 Date: Thu, 30 May 2019 02:23:28 +0200 Subject: [PATCH] Add getter for standalone mode of the plugin --- pom.xml | 3 ++- .../Minepacks/Bukkit/API/MinepacksCommand.java | 3 +++ .../Minepacks/Bukkit/API/MinepacksCommandManager.java | 2 ++ .../Minepacks/Bukkit/API/MinepacksPlugin.java | 7 +++++++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dd6f6d7..129f75a 100644 --- a/pom.xml +++ b/pom.xml @@ -57,7 +57,8 @@ at.pcgamingfreaks PluginLib - 1.0.8-SNAPSHOT + 1.0.11-SNAPSHOT + provided diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksCommand.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksCommand.java index 8dc8783..ebcf60c 100644 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksCommand.java +++ b/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksCommand.java @@ -32,6 +32,9 @@ import java.util.LinkedList; import java.util.List; +/** + * Only available if the plugin is not running in standalone mode! + */ public abstract class MinepacksCommand extends SubCommand { private static MinepacksPlugin minepacksPlugin = null; diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksCommandManager.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksCommandManager.java index 8cc2cdd..80e6edf 100644 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksCommandManager.java +++ b/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksCommandManager.java @@ -24,6 +24,7 @@ public interface MinepacksCommandManager { /** * Registers a new sub-command for /backpack. + * This function is only available if the plugin is not running in standalone mode! * * @param command The command that should be registered. */ @@ -31,6 +32,7 @@ public interface MinepacksCommandManager /** * Unregisters a sub-command for /backpack. + * This function is only available if the plugin is not running in standalone mode! * * @param command The command that should be unregistered. */ diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksPlugin.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksPlugin.java index 159a519..9a98399 100644 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksPlugin.java +++ b/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksPlugin.java @@ -57,6 +57,13 @@ public interface MinepacksPlugin return new Version("0.0"); } + /** + * Checks if the plugin is running in standalone mode. Some features and API functions are not available in standalone mode! + * + * @return True if the plugin is running in standalone mode. + */ + boolean isRunningInStandaloneMode(); + /** * Let a given player open the backpack of an other player. *