Class LuaCore

java.lang.Object
dev.selena.luacore.LuaCore

public class LuaCore extends Object
Main class for the library
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    This needs to be called in the onDisable method of lock file management
    static String
    Used for NBT compounds
    static String
    Method to get a specific lock file name
    static void
    lockCrashHandling(boolean... force)
    Used for crash handling of the lock files.
    static void
    This should only be called by one plugin on your server, Used for preventing the placement/usage of un usable items
    static void
    Used for saving all needed data call this in onDisable
    static void
    setPlugin(org.bukkit.plugin.Plugin plugin)
    Deprecated, for removal: This API element is subject to removal in a future version.
    static void
    setupCore(org.bukkit.plugin.Plugin plugin)
    Method to setup the library with the required methods (setPlugin and setCoreLogger)
    static void
    Used for setting up user data management, This is in early beta currently
    static void
    setVerbose(boolean verbose)
    Used for enabling extra messages

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LuaCore

      public LuaCore()
  • Method Details

    • setPlugin

      @Deprecated(forRemoval=true) public static void setPlugin(org.bukkit.plugin.Plugin plugin)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This needs to be called in the onEnable method of your plugin for it to work
      Parameters:
      plugin - Your main class that extends JavaPlugin
    • setupCore

      public static void setupCore(org.bukkit.plugin.Plugin plugin)
      Method to setup the library with the required methods (setPlugin and setCoreLogger)
      Parameters:
      plugin - Your plugin instance
    • lockCrashHandling

      public static void lockCrashHandling(boolean... force)
      Used for crash handling of the lock files. If the server is to crash and this method didn't exist, then you would have issues with lock files related to classes NOTE: If there is a start-up error causing crashes, you will likely encounter an issue with the lock files. If you need to manually delete them for any reason, they are located in the LuaCoreLocks inside your servers main folder. Not the plugin folder
      Parameters:
      force - set to true to force clearing the lock folder. Only one needs to go here it's just a way to avoid a second method.
    • setUserDataManager

      public static void setUserDataManager(UserDataManager userDataManager)
      Used for setting up user data management, This is in early beta currently
      Parameters:
      userDataManager - The instance of the UserDataManager class
    • registerItemEvents

      public static void registerItemEvents()
      This should only be called by one plugin on your server, Used for preventing the placement/usage of un usable items
    • setVerbose

      public static void setVerbose(boolean verbose)
      Used for enabling extra messages
      Parameters:
      verbose - True if you want extra messages
    • getCompountName

      public static String getCompountName()
      Used for NBT compounds
      Returns:
      Returns the compound name for your plugin
    • save

      public static void save()
      Used for saving all needed data call this in onDisable
    • disable

      public static void disable()
      This needs to be called in the onDisable method of lock file management
      See Also:
    • getLockFileName

      public static String getLockFileName(String name)
      Method to get a specific lock file name
      Parameters:
      name - The name of the file (exclusive on the lock root dir)
      Returns:
      The path string for the new lock file