Class Stweaks

java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
com.storytimeproductions.stweaks.Stweaks
All Implemented Interfaces:
io.papermc.paper.plugin.lifecycle.event.LifecycleEventOwner, org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin

public class Stweaks extends org.bukkit.plugin.java.JavaPlugin
Main class for the Stweaks, a plugin designed to manage and track player playtime, enforce playtime requirements, and handle other gameplay enhancements. This class is responsible for initializing the plugin, loading configurations, registering commands, listeners, and events, as well as shutting down services on plugin disable. Created by StoryTime Productions on 2025-04-17.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Stweaks
    Gets the instance of the Stweaks plugin.
    void
    Called when the plugin is disabled.
    void
    Called when the plugin is enabled.
    void
    registerListener(org.bukkit.event.Listener listener)
    Registers a Bukkit event listener for this plugin.

    Methods inherited from class org.bukkit.plugin.java.JavaPlugin

    getClassLoader, getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLifecycleManager, getLogger, getPlugin, getPluginLoader, getPluginMeta, getProvidingPlugin, getResource, getServer, getTextResource, init, init, isEnabled, isNaggable, onCommand, onLoad, onTabComplete, registerCommand, registerCommand, registerCommand, registerCommand, 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, getDataPath, getLog4JLogger, getSLF4JLogger
  • Constructor Details

    • Stweaks

      public Stweaks()
  • Method Details

    • onEnable

      public void onEnable()
      Called when the plugin is enabled. This method is responsible for setting up the plugin, including loading the configuration, registering event listeners, and initializing the playtime tracker and event manager.
      Specified by:
      onEnable in interface org.bukkit.plugin.Plugin
      Overrides:
      onEnable in class org.bukkit.plugin.java.JavaPlugin
    • onDisable

      public void onDisable()
      Called when the plugin is disabled. This method is responsible for shutting down services like the playtime tracker.
      Specified by:
      onDisable in interface org.bukkit.plugin.Plugin
      Overrides:
      onDisable in class org.bukkit.plugin.java.JavaPlugin
    • getInstance

      public static Stweaks getInstance()
      Gets the instance of the Stweaks plugin. This method provides access to the plugin's main instance, allowing other parts of the code to interact with the plugin.
      Returns:
      The current instance of the Stweaks plugin.
    • registerListener

      public void registerListener(org.bukkit.event.Listener listener)
      Registers a Bukkit event listener for this plugin.

      This method registers the provided listener with the Bukkit event system, allowing the listener to handle events for this plugin.

      Parameters:
      listener - The event listener to register.