Package valorless.valorlessutils
Class ValorlessUtils
java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
valorless.valorlessutils.ValorlessUtils
- All Implemented Interfaces:
org.bukkit.command.CommandExecutor,org.bukkit.command.TabCompleter,org.bukkit.command.TabExecutor,org.bukkit.event.Listener,org.bukkit.plugin.Plugin
public final class ValorlessUtils
extends org.bukkit.plugin.java.JavaPlugin
implements org.bukkit.event.Listener
Main plugin class for ValorlessUtils.
Provides utility methods for server interaction, debugging, item manipulation, logging, and PersistentDataContainer handling. Also contains deprecated legacy methods for backward compatibility.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classLogging utility methods.static classDeprecated.static classDeprecated.UseUtilsinstead. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ConfigPlugin configuration handler.static org.bukkit.plugin.java.JavaPluginstatic org.bukkit.plugin.java.JavaPluginInstance of this plugin for static access. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAddCommand(String command, String... alias) Registers a command and optional aliases to this plugin.static voidbread()Gives all online players a custom enchanted "bread" item.static ValorlessUtilsReturns the instance of the ValorlessUtils plugin.static Server.VersionReturns the resolved server version.static StringReturns the resolved server version as a string without the "v" prefix.voidvoidonEnable()voidonLoad()Called when the plugin is being loaded.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, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toStringMethods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCode
-
Field Details
-
thisPlugin
public static org.bukkit.plugin.java.JavaPlugin thisPluginInstance of this plugin for static access. -
plugin
public static org.bukkit.plugin.java.JavaPlugin plugin -
config
Plugin configuration handler.
-
-
Constructor Details
-
ValorlessUtils
public ValorlessUtils()
-
-
Method Details
-
bread
public static void bread()Gives all online players a custom enchanted "bread" item. -
onLoad
public void onLoad()Called when the plugin is being loaded.Initializes plugin instances and resolves the server version.
- Specified by:
onLoadin interfaceorg.bukkit.plugin.Plugin- Overrides:
onLoadin classorg.bukkit.plugin.java.JavaPlugin
-
getServerVersion
Returns the resolved server version.- Returns:
- The current
Server.Versionof the server.
-
getServerVersionString
Returns the resolved server version as a string without the "v" prefix.- Returns:
- Server version as a string.
-
onEnable
public void onEnable()- Specified by:
onEnablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onEnablein classorg.bukkit.plugin.java.JavaPlugin
-
onDisable
public void onDisable()- Specified by:
onDisablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onDisablein classorg.bukkit.plugin.java.JavaPlugin
-
GetInstance
Returns the instance of the ValorlessUtils plugin.- Returns:
- The plugin instance.
-
AddCommand
Registers a command and optional aliases to this plugin.- Parameters:
command- The main command.alias- Optional command aliases.
-
Tags.