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 classDeprecated, for removal: This API element is subject to removal in a future version. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbread()Gives all online players a custom enchanted "bread" item.static ValorlessUtilsReturns the instance of the ValorlessUtils plugin.static ValorlessUtilsDeprecated, for removal: This API element is subject to removal in a future version.UsegetInstance()instead.static LanggetLang()Returns the language handler instance for this 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
-
plugin
public static org.bukkit.plugin.java.JavaPlugin pluginInstance of this plugin for static access. -
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. -
getLang
Returns the language handler instance for this plugin.- Returns:
- The
Langinstance used for localization.
-
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.
-
GetInstance
@Deprecated(since="Replaced by getInstance()", forRemoval=true) public static ValorlessUtils GetInstance()Deprecated, for removal: This API element is subject to removal in a future version.UsegetInstance()instead. This method is marked for removal in future versions.Returns the instance of the ValorlessUtils plugin.- Returns:
- The plugin instance.
-
Log.