public class CommonBootstrap extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
WARN_WHEN_INIT_SERVER |
static boolean |
WARN_WHEN_INIT_TEMPLATES |
Constructor and Description |
---|
CommonBootstrap() |
Modifier and Type | Method and Description |
---|---|
static boolean |
evaluateMCVersion(String operand,
String version)
Checks if the Minecraft version matches a version condition
|
static TemplateResolver |
getTemplates()
Gets the template engine without initializing it.
|
static CommonServer |
initCommonServer()
Detects and returns the common server implementation that is used.
|
static void |
initServer()
Ensures that
Bukkit.getServer() returns a valid non-null Server instance. |
static TemplateResolver |
initTemplates()
Initializes the template engine, so that templates can be loaded into their respective
handles.
|
static boolean |
isSpigotServer()
Gets whether the server we are currently running on is a Spigot server
|
static boolean |
isTestMode()
Detects whether the server is running under test, and not on an actual live server
|
public static boolean WARN_WHEN_INIT_SERVER
public static boolean WARN_WHEN_INIT_TEMPLATES
public static boolean evaluateMCVersion(String operand, String version)
operand
- to evaluate with, for example ">=" and "!="version
- the operand is applied to (right side)public static boolean isSpigotServer()
public static CommonServer initCommonServer()
public static TemplateResolver getTemplates()
public static TemplateResolver initTemplates()
public static boolean isTestMode()
public static void initServer()
Bukkit.getServer()
returns a valid non-null Server instance.
During normal execution this is guaranteed to be fine, but while running tests this is not
the case.Copyright © 2019. All rights reserved.