Class Stargate
- All Implemented Interfaces:
io.papermc.paper.plugin.lifecycle.event.LifecycleEventOwner
,org.bukkit.command.CommandExecutor
,org.bukkit.command.TabCompleter
,org.bukkit.command.TabExecutor
,org.bukkit.plugin.Plugin
,ConfigurationAPI
,StargateAPI
https://git.io/JuWkU | https://discord.gg/mTaHuK6BVa
Lead Developers:
- Author:
- Thorin (2020-Present), EpicKnarvik97 (2021-Present), PseudoKnight (2015-2020), Drakia (2011-2013), Dinnerbone (2010-2011)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the absolute path to Stargate's data folderGets the bungee manager used for dealing with bungee related events@NotNull org.bukkit.configuration.file.FileConfiguration
Gets the configuration API used to interact with the configuration filegetConfigurationOptionValue
(ConfigurationOption configurationOption) Gets the current value of a configuration optionGets the economy manager used for this pluginstatic org.bukkit.configuration.file.FileConfiguration
static Stargate
Gets an instance of this pluginGets the language manager used for translating stringsgetPermissionManager
(org.bukkit.entity.Entity entity) Gets permission manager for specified entityGets the registry used to register and unregister Stargatesstatic String
Gets the name of this server as defined by BungeeCordstatic String
Gets this server's unique idGets the storage API used to store and load Stargatesstatic StorageAPI
Static access of the database interface, will throw null pointer exception if stargate has not been initializedstatic boolean
Gets whether this server knows its own namestatic void
Log an exception at the WARNING levelstatic void
Log any message at the given levelstatic void
Log an exception at the given levelvoid
logMessage
(Level priorityLevel, String message) Log any message at the given levelvoid
void
onEnable()
void
reload()
Reloads the configuration from diskvoid
void
void
Saves the current state of the configuration to diskvoid
setConfigurationOptionValue
(ConfigurationOption configurationOption, Object newValue) Sets the value of a configuration optionstatic void
setKnowsServerName
(boolean knowsServerName) Sets whether this server knows its server namestatic void
setLogLevel
(Level priorityLevel) Change the log level of Stargate.static void
setServerName
(String serverName) Sets this server's name as defined by BungeeCordstatic void
setServerUUID
(UUID serverUUID) Sets this server's unique idMethods inherited from class org.bukkit.plugin.java.JavaPlugin
getClassLoader, getCommand, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLifecycleManager, getLogger, getPlugin, getPluginLoader, getPluginMeta, getProvidingPlugin, getResource, getServer, getTextResource, init, init, isEnabled, isNaggable, onCommand, onLoad, onTabComplete, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString
Methods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.bukkit.plugin.Plugin
getComponentLogger, getLog4JLogger, getSLF4JLogger
-
Constructor Details
-
Stargate
public Stargate()
-
-
Method Details
-
onEnable
public void onEnable()- Specified by:
onEnable
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
onEnable
in classorg.bukkit.plugin.java.JavaPlugin
-
getEconomyManager
Gets the economy manager used for this plugin- Specified by:
getEconomyManager
in interfaceStargateAPI
- Returns:
The economy manager used for this plugin
-
getMaterialHandlerResolver
- Specified by:
getMaterialHandlerResolver
in interfaceStargateAPI
- Returns:
The material handler resolver used by stargate addons
-
getNetworkManager
- Specified by:
getNetworkManager
in interfaceStargateAPI
- Returns:
The network manager used to fetch networks from strings
-
getAbsoluteDataFolder
Gets the absolute path to Stargate's data folder- Returns:
The absolute path to the data folder
-
getServerName
Gets the name of this server as defined by BungeeCord- Returns:
The name of this server
-
setServerName
Sets this server's name as defined by BungeeCord- Parameters:
serverName
-The new name of this server
-
knowsServerName
public static boolean knowsServerName()Gets whether this server knows its own name- Returns:
True if this server knows its own name
-
setKnowsServerName
public static void setKnowsServerName(boolean knowsServerName) Sets whether this server knows its server name- Parameters:
knowsServerName
-Whether this server knows its server name
-
getServerUUID
Gets this server's unique id- Returns:
This server's unique id
-
setServerUUID
Sets this server's unique id- Parameters:
serverUUID
-This server's new unique id
-
getConfig
@NotNull public @NotNull org.bukkit.configuration.file.FileConfiguration getConfig()- Specified by:
getConfig
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
getConfig
in classorg.bukkit.plugin.java.JavaPlugin
-
reloadConfig
public void reloadConfig()- Specified by:
reloadConfig
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
reloadConfig
in classorg.bukkit.plugin.java.JavaPlugin
-
saveConfig
public void saveConfig()- Specified by:
saveConfig
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
saveConfig
in classorg.bukkit.plugin.java.JavaPlugin
-
setConfigurationOptionValue
Description copied from interface:ConfigurationAPI
Sets the value of a configuration option- Specified by:
setConfigurationOptionValue
in interfaceConfigurationAPI
- Parameters:
configurationOption
-The configuration option to update
newValue
-The new value of the configuration option
-
getConfigurationOptionValue
Description copied from interface:ConfigurationAPI
Gets the current value of a configuration option- Specified by:
getConfigurationOptionValue
in interfaceConfigurationAPI
- Parameters:
configurationOption
-The configuration option to get the value of
- Returns:
The current value of the specified configuration option
-
saveConfiguration
public void saveConfiguration()Description copied from interface:ConfigurationAPI
Saves the current state of the configuration to diskThis needs to be run after any config changes to update the config file.
- Specified by:
saveConfiguration
in interfaceConfigurationAPI
-
reload
public void reload()Description copied from interface:ConfigurationAPI
Reloads the configuration from diskThis needs to be executed in order for saved config changes to take effect.
- Specified by:
reload
in interfaceConfigurationAPI
-
onDisable
public void onDisable()- Specified by:
onDisable
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
onDisable
in classorg.bukkit.plugin.java.JavaPlugin
-
log
Log an exception at the WARNING level- Parameters:
throwable
-THe exception to log
-
log
Log an exception at the given level- Parameters:
logLevel
-The level to log on
throwable
-The exception to log
-
log
Log any message at the given level- Parameters:
priorityLevel
-The log level to log the message on
message
-The message to log
-
setLogLevel
Change the log level of Stargate. Does not save new level to the config- Parameters:
priorityLevel
-The new priority level to set
-
getInstance
Gets an instance of this plugin- Returns:
An instance of this plugin
-
logMessage
Log any message at the given level- Parameters:
priorityLevel
-The log level to log the message on
message
-The message to log
-
getFileConfiguration
public static org.bukkit.configuration.file.FileConfiguration getFileConfiguration()- Returns:
Get the configuration of stargate, or an empty config
-
getStorageAPIStatic
Static access of the database interface, will throw null pointer exception if stargate has not been initialized- Returns:
A storage API instance
-
getRegistry
Description copied from interface:StargateAPI
Gets the registry used to register and unregister Stargates- Specified by:
getRegistry
in interfaceStargateAPI
- Returns:
The registry used to register and unregister Stargates
-
getStorageAPI
Description copied from interface:StargateAPI
Gets the storage API used to store and load Stargates- Specified by:
getStorageAPI
in interfaceStargateAPI
- Returns:
The storage API used to store and load stargates
-
getLanguageManager
Description copied from interface:StargateAPI
Gets the language manager used for translating strings- Specified by:
getLanguageManager
in interfaceStargateAPI
- Returns:
The language manager used for translating strings
-
getPermissionManager
Description copied from interface:StargateAPI
Gets permission manager for specified entity- Specified by:
getPermissionManager
in interfaceStargateAPI
- Parameters:
entity
-The entity to check permissions on
- Returns:
A permission manager
-
getConfigurationAPI
Description copied from interface:StargateAPI
Gets the configuration API used to interact with the configuration file- Specified by:
getConfigurationAPI
in interfaceStargateAPI
- Returns:
The configuration API
-
getBungeeManager
Description copied from interface:StargateAPI
Gets the bungee manager used for dealing with bungee related events- Specified by:
getBungeeManager
in interfaceStargateAPI
- Returns:
The bungee manager used for dealing with bungee related events
-
getBlockLoggerManager
- Returns:
The block-logger used for dealing with external block logging plugin compatibility
-
getStoredPropertiesAPI
- Returns:
The database dealing with internally stored properties
-