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.
    Returns the deadPlayers.yml file as a SemiHardcoreYmlFile.
    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 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

    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

    Methods inherited from class java.lang.Object

    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
    • 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

      public SemiHardcoreYmlFile getDeadPlayersFile()
      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