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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkAddonForUpdates
(String name) Checks the given add-on for updates.Returns the deadPlayers.yml file as aSemiHardcoreYmlFile
.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 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
getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, isEnabled, isNaggable, onCommand, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, 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
-
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
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
-