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 SummaryNested ClassesModifier and TypeClassDescriptionstatic classLogging utility methods.static classDeprecated.static classDeprecated.UseUtilsinstead.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic ConfigPlugin configuration handler.static org.bukkit.plugin.java.JavaPluginstatic org.bukkit.plugin.java.JavaPluginInstance of this plugin for static access.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.JavaPlugingetClassLoader, 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.PluginBaseequals, getName, hashCode
- 
Field Details- 
thisPluginpublic static org.bukkit.plugin.java.JavaPlugin thisPluginInstance of this plugin for static access.
- 
pluginpublic static org.bukkit.plugin.java.JavaPlugin plugin
- 
configPlugin configuration handler.
 
- 
- 
Constructor Details- 
ValorlessUtilspublic ValorlessUtils()
 
- 
- 
Method Details- 
breadpublic static void bread()Gives all online players a custom enchanted "bread" item.
- 
onLoadpublic void onLoad()Called when the plugin is being loaded.Initializes plugin instances and resolves the server version. - Specified by:
- onLoadin interface- org.bukkit.plugin.Plugin
- Overrides:
- onLoadin class- org.bukkit.plugin.java.JavaPlugin
 
- 
getServerVersionReturns the resolved server version.- Returns:
- The current Server.Versionof the server.
 
- 
getServerVersionStringReturns the resolved server version as a string without the "v" prefix.- Returns:
- Server version as a string.
 
- 
onEnablepublic void onEnable()- Specified by:
- onEnablein interface- org.bukkit.plugin.Plugin
- Overrides:
- onEnablein class- org.bukkit.plugin.java.JavaPlugin
 
- 
onDisablepublic void onDisable()- Specified by:
- onDisablein interface- org.bukkit.plugin.Plugin
- Overrides:
- onDisablein class- org.bukkit.plugin.java.JavaPlugin
 
- 
GetInstanceReturns the instance of the ValorlessUtils plugin.- Returns:
- The plugin instance.
 
- 
AddCommandRegisters a command and optional aliases to this plugin.- Parameters:
- command- The main command.
- alias- Optional command aliases.
 
 
- 
Tags.