Package me.manossef.semihardcore
Class SemiHardcore
java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
me.manossef.semihardcore.SemiHardcore
- All Implemented Interfaces:
org.bukkit.command.CommandExecutor
,org.bukkit.command.TabCompleter
,org.bukkit.command.TabExecutor
,org.bukkit.plugin.Plugin
public class SemiHardcore
extends org.bukkit.plugin.java.JavaPlugin
This is the main class of SemiHardcore. This class has control over everything happening in the plugin, keeping track
of its options, commands, and listeners.
Every add-on for this plugin should first check if the plugin found on the server is an instance of this class, to make sure the plugin is correct, and also so that the various resources contained in this class can be used.
- Author:
- ManosSef
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkAddonForUpdates
(String name) Checks the given add-on for updates.Deprecated, for removal: This API element is subject to removal in a future version.The deadPlayers.yml file has been removed.Returns the plugin's instance ofLifeChanges
, the class that is responsible for every change in any player's life count or death status, as well as a lot of the plugin's messages.protected LifeData
Returns the internal life data.Returns the lives.yml file as aSemiHardcoreYmlFile
.Returns the plugin's message configuration, as aMessages
object.Returns the messages.yml file as aSemiHardcoreYmlFile
.com.google.gson.stream.JsonReader
Returns the official list of add-ons, retrieved from this GitHub page, in the form of aJsonReader
.Returns the plugin's configuration options, as anOptions
object.boolean
isAddonToBeChecked
(String name) Checks if the given add-on is yet to be checked for updates.void
Runs automatically when the plugin is disabled, and must never be called by any plugin add-ons.void
onEnable()
Runs automatically when the plugin is enabled, and must never be called by any plugin add-ons.Methods inherited from class org.bukkit.plugin.java.JavaPlugin
getClassLoader, getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onCommand, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString
Methods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCode
-
Constructor Details
-
SemiHardcore
public SemiHardcore()
-
-
Method Details
-
onEnable
public void onEnable()Runs automatically when the plugin is enabled, and must never be called by any plugin add-ons.- Specified by:
onEnable
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
onEnable
in classorg.bukkit.plugin.java.JavaPlugin
-
onDisable
public void onDisable()Runs automatically when the plugin is disabled, and must never be called by any plugin add-ons.- Specified by:
onDisable
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
onDisable
in classorg.bukkit.plugin.java.JavaPlugin
-
getOfficialAddonList
public com.google.gson.stream.JsonReader getOfficialAddonList()Returns the official list of add-ons, retrieved from this GitHub page, in the form of aJsonReader
.- Returns:
- The official add-on list.
-
isAddonToBeChecked
Checks if the given add-on is yet to be checked for updates.- Parameters:
name
- The add-on's name.- Returns:
true
if the add-on is yet to be checked,false
otherwise.
-
checkAddonForUpdates
Checks the given add-on for updates.- Parameters:
name
- The add-on's name.
-
getOptions
Returns the plugin's configuration options, as anOptions
object.- Returns:
- The plugin's options.
-
getMessages
Returns the plugin's message configuration, as aMessages
object.- Returns:
- The plugin's messages.
-
getLifeData
Returns the internal life data.- Returns:
- The plugin's life data.
-
getLifeChanges
Returns the plugin's instance ofLifeChanges
, the class that is responsible for every change in any player's life count or death status, as well as a lot of the plugin's messages.- Returns:
- The plugin's instance of
LifeChanges
.
-
getLivesFile
Returns the lives.yml file as aSemiHardcoreYmlFile
.- Returns:
- The lives.yml file data.
-
getDeadPlayersFile
Deprecated, for removal: This API element is subject to removal in a future version.The deadPlayers.yml file has been removed.Returns the deadPlayers.yml file as aSemiHardcoreYmlFile
.- Returns:
- The deadPlayers.yml file data.
-
getMessagesFile
Returns the messages.yml file as aSemiHardcoreYmlFile
.- Returns:
- The messages.yml file data.
-