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
Constructors -
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.FileConfigurationGets 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.FileConfigurationstatic StargateGets 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 StringGets the name of this server as defined by BungeeCordstatic StringGets this server's unique idGets the storage API used to store and load Stargatesstatic StorageAPIStatic access of the database interface, will throw null pointer exception if stargate has not been initializedstatic booleanGets whether this server knows its own namestatic voidLog an exception at the WARNING levelstatic voidLog any message at the given levelstatic voidLog an exception at the given levelvoidlogMessage(Level priorityLevel, String message) Log any message at the given levelvoidvoidonEnable()voidreload()Reloads the configuration from diskvoidvoidvoidSaves the current state of the configuration to diskvoidsetConfigurationOptionValue(ConfigurationOption configurationOption, Object newValue) Sets the value of a configuration optionstatic voidsetKnowsServerName(boolean knowsServerName) Sets whether this server knows its server namestatic voidsetLogLevel(Level priorityLevel) Change the log level of Stargate.static voidsetServerName(String serverName) Sets this server's name as defined by BungeeCordstatic voidsetServerUUID(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, toStringMethods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bukkit.plugin.Plugin
getComponentLogger, getLog4JLogger, getSLF4JLogger
-
Constructor Details
-
Stargate
public Stargate()
-
-
Method Details
-
onEnable
public void onEnable()- Specified by:
onEnablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onEnablein classorg.bukkit.plugin.java.JavaPlugin
-
getEconomyManager
Gets the economy manager used for this plugin- Specified by:
getEconomyManagerin interfaceStargateAPI- Returns:
The economy manager used for this plugin
-
getMaterialHandlerResolver
- Specified by:
getMaterialHandlerResolverin interfaceStargateAPI- Returns:
The material handler resolver used by stargate addons
-
getNetworkManager
- Specified by:
getNetworkManagerin 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:
getConfigin interfaceorg.bukkit.plugin.Plugin- Overrides:
getConfigin classorg.bukkit.plugin.java.JavaPlugin
-
reloadConfig
public void reloadConfig()- Specified by:
reloadConfigin interfaceorg.bukkit.plugin.Plugin- Overrides:
reloadConfigin classorg.bukkit.plugin.java.JavaPlugin
-
saveConfig
public void saveConfig()- Specified by:
saveConfigin interfaceorg.bukkit.plugin.Plugin- Overrides:
saveConfigin classorg.bukkit.plugin.java.JavaPlugin
-
setConfigurationOptionValue
Description copied from interface:ConfigurationAPISets the value of a configuration option- Specified by:
setConfigurationOptionValuein interfaceConfigurationAPI- Parameters:
configurationOption-The configuration option to update
newValue-The new value of the configuration option
-
getConfigurationOptionValue
Description copied from interface:ConfigurationAPIGets the current value of a configuration option- Specified by:
getConfigurationOptionValuein 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:ConfigurationAPISaves the current state of the configuration to diskThis needs to be run after any config changes to update the config file.
- Specified by:
saveConfigurationin interfaceConfigurationAPI
-
reload
public void reload()Description copied from interface:ConfigurationAPIReloads the configuration from diskThis needs to be executed in order for saved config changes to take effect.
- Specified by:
reloadin interfaceConfigurationAPI
-
onDisable
public void onDisable()- Specified by:
onDisablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onDisablein 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:StargateAPIGets the registry used to register and unregister Stargates- Specified by:
getRegistryin interfaceStargateAPI- Returns:
The registry used to register and unregister Stargates
-
getStorageAPI
Description copied from interface:StargateAPIGets the storage API used to store and load Stargates- Specified by:
getStorageAPIin interfaceStargateAPI- Returns:
The storage API used to store and load stargates
-
getLanguageManager
Description copied from interface:StargateAPIGets the language manager used for translating strings- Specified by:
getLanguageManagerin interfaceStargateAPI- Returns:
The language manager used for translating strings
-
getPermissionManager
Description copied from interface:StargateAPIGets permission manager for specified entity- Specified by:
getPermissionManagerin interfaceStargateAPI- Parameters:
entity-The entity to check permissions on
- Returns:
A permission manager
-
getConfigurationAPI
Description copied from interface:StargateAPIGets the configuration API used to interact with the configuration file- Specified by:
getConfigurationAPIin interfaceStargateAPI- Returns:
The configuration API
-
getBungeeManager
Description copied from interface:StargateAPIGets the bungee manager used for dealing with bungee related events- Specified by:
getBungeeManagerin 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
-