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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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 of LifeChanges, 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 a SemiHardcoreYmlFile.
    Returns the plugin's message configuration, as a Messages object.
    Returns the messages.yml file as a SemiHardcoreYmlFile.
    com.google.gson.stream.JsonReader
    Returns the official list of add-ons, retrieved from this GitHub page, in the form of a JsonReader.
    Returns the plugin's configuration options, as an Options object.
    boolean
    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
    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

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 interface org.bukkit.plugin.Plugin
      Overrides:
      onEnable in class org.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 interface org.bukkit.plugin.Plugin
      Overrides:
      onDisable in class org.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 a JsonReader.
      Returns:
      The official add-on list.
    • isAddonToBeChecked

      public boolean isAddonToBeChecked(String name)
      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

      public void checkAddonForUpdates(String name)
      Checks the given add-on for updates.
      Parameters:
      name - The add-on's name.
    • getOptions

      public Options getOptions()
      Returns the plugin's configuration options, as an Options object.
      Returns:
      The plugin's options.
    • getMessages

      public Messages getMessages()
      Returns the plugin's message configuration, as a Messages object.
      Returns:
      The plugin's messages.
    • getLifeData

      protected LifeData getLifeData()
      Returns the internal life data.
      Returns:
      The plugin's life data.
    • getLifeChanges

      public LifeChanges getLifeChanges()
      Returns the plugin's instance of LifeChanges, 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

      public SemiHardcoreYmlFile getLivesFile()
      Returns the lives.yml file as a SemiHardcoreYmlFile.
      Returns:
      The lives.yml file data.
    • getDeadPlayersFile

      @Deprecated(since="2.7.0", forRemoval=true) public SemiHardcoreYmlFile 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 a SemiHardcoreYmlFile.
      Returns:
      The deadPlayers.yml file data.
    • getMessagesFile

      public SemiHardcoreYmlFile getMessagesFile()
      Returns the messages.yml file as a SemiHardcoreYmlFile.
      Returns:
      The messages.yml file data.