Add getter for standalone mode of the plugin

This commit is contained in:
GeorgH93 2019-05-30 02:23:28 +02:00
parent e963dc49b3
commit 060128b9d6
No known key found for this signature in database
GPG Key ID: D1630D37F9E4B3C8
4 changed files with 14 additions and 1 deletions

View File

@ -57,7 +57,8 @@
<dependency>
<groupId>at.pcgamingfreaks</groupId>
<artifactId>PluginLib</artifactId>
<version>1.0.8-SNAPSHOT</version>
<version>1.0.11-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>

View File

@ -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;

View File

@ -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.
*/

View File

@ -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.
*