Package com.storytimeproductions.stweaks
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic StweaksGets the instance of the Stweaks plugin.voidCalled when the plugin is disabled.voidonEnable()Called when the plugin is enabled.voidregisterListener(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, toStringMethods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
onEnablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onEnablein classorg.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:
onDisablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onDisablein classorg.bukkit.plugin.java.JavaPlugin
-
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.
-