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 Classes
    Modifier and Type
    Class
    Description
    static class 
    Logging utility methods.
    static class 
    Deprecated.
    Replaced with Tags.
    static class 
    Deprecated.
    Use Utils instead.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static Config
    Plugin configuration handler.
    static org.bukkit.plugin.java.JavaPlugin
     
    static org.bukkit.plugin.java.JavaPlugin
    Instance of this plugin for static access.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    AddCommand(String command, String... alias)
    Registers a command and optional aliases to this plugin.
    static void
    Gives all online players a custom enchanted "bread" item.
    Returns the instance of the ValorlessUtils plugin.
    Returns the resolved server version.
    static String
    Returns the resolved server version as a string without the "v" prefix.
    void
     
    void
     
    void
    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, 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
  • Field Details

    • thisPlugin

      public static org.bukkit.plugin.java.JavaPlugin thisPlugin
      Instance of this plugin for static access.
    • plugin

      public static org.bukkit.plugin.java.JavaPlugin plugin
    • config

      public static Config 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:
      onLoad in interface org.bukkit.plugin.Plugin
      Overrides:
      onLoad in class org.bukkit.plugin.java.JavaPlugin
    • getServerVersion

      public static Server.Version getServerVersion()
      Returns the resolved server version.
      Returns:
      The current Server.Version of the server.
    • getServerVersionString

      public static String 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:
      onEnable in interface org.bukkit.plugin.Plugin
      Overrides:
      onEnable in class org.bukkit.plugin.java.JavaPlugin
    • onDisable

      public void onDisable()
      Specified by:
      onDisable in interface org.bukkit.plugin.Plugin
      Overrides:
      onDisable in class org.bukkit.plugin.java.JavaPlugin
    • GetInstance

      public static ValorlessUtils GetInstance()
      Returns the instance of the ValorlessUtils plugin.
      Returns:
      The plugin instance.
    • AddCommand

      public void AddCommand(String command, String... alias)
      Registers a command and optional aliases to this plugin.
      Parameters:
      command - The main command.
      alias - Optional command aliases.