Package nl.mtvehicles.core
Class Main
java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
nl.mtvehicles.core.Main
- All Implemented Interfaces:
org.bukkit.command.CommandExecutor
,org.bukkit.command.TabCompleter
,org.bukkit.command.TabExecutor
,org.bukkit.plugin.Plugin
public class Main
extends org.bukkit.plugin.java.JavaPlugin
The plugin's main class
-
Field Summary
Modifier and TypeFieldDescriptionstatic String
Version of config.yml AND vehicles.yml - must be equal to the version in SuperSecretSettings.
We might not change config in every version, why bother creating a new config file on every update then? Change this EVERY TIME you edit config.static Main
The plugin instancestatic String
Version of messages_xx.yml files - must be equal to the version in SuperSecretSettings.
This variable works exactly asconfigVersion
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Disable the plugin (when a fatal error occurs)static String
static void
Log an informative message to the consolestatic void
Log a message warning about a severe issue to the console (red)static void
logWarning(String text)
Log a warning to the console (yellow)void
void
onEnable()
void
onLoad()
void
registerListener(org.bukkit.event.Listener listener)
Register a listenerstatic void
schedulerRun(Runnable task)
Run a task using a bukkit schedulerMethods inherited from class org.bukkit.plugin.java.JavaPlugin
getClassLoader, getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getPluginMeta, getProvidingPlugin, getResource, getServer, getTextResource, init, init, isEnabled, isNaggable, onCommand, onTabComplete, reloadConfig, saveConfig, 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
-
Field Details
-
instance
The plugin instance -
configVersion
Version of config.yml AND vehicles.yml - must be equal to the version in SuperSecretSettings.
We might not change config in every version, why bother creating a new config file on every update then? Change this EVERY TIME you edit config. OTHERWISE, DON'T TOUCH IT.- See Also:
SecretSettingsConfig
, Constant Field Values
-
messagesVersion
Version of messages_xx.yml files - must be equal to the version in SuperSecretSettings.
This variable works exactly asconfigVersion
.- See Also:
- Constant Field Values
-
-
Constructor Details
-
Main
public Main()
-
-
Method Details
-
onEnable
public void onEnable()- Specified by:
onEnable
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
onEnable
in classorg.bukkit.plugin.java.JavaPlugin
-
onLoad
public void onLoad()- Specified by:
onLoad
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
onLoad
in classorg.bukkit.plugin.java.JavaPlugin
-
onDisable
public void onDisable()- Specified by:
onDisable
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
onDisable
in classorg.bukkit.plugin.java.JavaPlugin
-
getFileAsString
-
registerListener
public void registerListener(org.bukkit.event.Listener listener)Register a listener- See Also:
ListenersModule
-
disablePlugin
public static void disablePlugin()Disable the plugin (when a fatal error occurs) -
logInfo
Log an informative message to the console -
logWarning
Log a warning to the console (yellow) -
logSevere
Log a message warning about a severe issue to the console (red) -
schedulerRun
Run a task using a bukkit scheduler
-