Package dev.selena.luacore
Class LuaCore
java.lang.Object
dev.selena.luacore.LuaCore
Main class for the library
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
disable()
This needs to be called in the onDisable method of lock file managementstatic String
Used for NBT compoundsstatic String
getLockFileName
(String name) Method to get a specific lock file namestatic 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 itemsstatic void
save()
Used for saving all needed data call this in onDisablestatic 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
setUserDataManager
(UserDataManager userDataManager) Used for setting up user data management, This is in early beta currentlystatic void
setVerbose
(boolean verbose) Used for enabling extra messages
-
Constructor Details
-
LuaCore
public LuaCore()
-
-
Method Details
-
setPlugin
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
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
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
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
-
setupCore(Plugin)