Package com.ryandw11.structure
Class CustomStructures
java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
com.ryandw11.structure.CustomStructures
- All Implemented Interfaces:
org.bukkit.command.CommandExecutor,org.bukkit.command.TabCompleter,org.bukkit.command.TabExecutor,org.bukkit.plugin.Plugin
public class CustomStructures
extends org.bukkit.plugin.java.JavaPlugin
The main class for the Custom Structures plugin.
Use getInstance() to get the instance of the main class.
- Version:
- 1.9.0
- Author:
- Ryandw11
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intThe current version of the compiled structure format.static intThe current version of the structure configuration format.static booleanWhether the plugin is enabled.static CustomStructuresThe instance of the CustomStructures plugin. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the addon handler for the plugin.Get the blocks the plugin should ignore for the server's minecraft version.Get the hook for citizens.Get the custom item manager.static CustomStructuresGet the instance of the main class.Get the loot table handler.Get the hook for mythical mobs.Get the structure handler for the plugin.Get the handler for registering custom structure signs.voidInitializes the plugin by creating theStructureHandler.booleanisDebug()If the plugin is in debug mode.voidLoaded needed files.voidvoidonEnable()voidReload the handlers.static StringreplacePAPIPlaceholders(String text)Resolves PAPI placeholders.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, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toStringMethods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCode
-
Field Details
-
plugin
The instance of the CustomStructures plugin.Use
getInstance()instead. -
enabled
public static boolean enabledWhether the plugin is enabled. -
COMPILED_STRUCT_VER
public static final int COMPILED_STRUCT_VERThe current version of the compiled structure format.- See Also:
- Constant Field Values
-
CONFIG_VERSION
public static final int CONFIG_VERSIONThe current version of the structure configuration format.- See Also:
- Constant Field Values
-
-
Constructor Details
-
CustomStructures
public CustomStructures()
-
-
Method Details
-
onEnable
public void onEnable()- Specified by:
onEnablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onEnablein classorg.bukkit.plugin.java.JavaPlugin
-
initialize
public void initialize()Initializes the plugin by creating theStructureHandler.This is called internally after all plugins are initialized.
-
replacePAPIPlaceholders
Resolves PAPI placeholders.- Parameters:
text- The text which may contain placeholders.- Returns:
- The final text.
-
onDisable
public void onDisable()- Specified by:
onDisablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onDisablein classorg.bukkit.plugin.java.JavaPlugin
-
getBlockIgnoreManager
Get the blocks the plugin should ignore for the server's minecraft version.- Returns:
- The proper block ignore list.
-
getStructureHandler
Get the structure handler for the plugin.This will be null until after all plugins have been enabled.
- Returns:
- The structure handler.
-
getLootTableHandler
Get the loot table handler.- Returns:
- The loot table handler.
-
reloadHandlers
public void reloadHandlers()Reload the handlers.This is for internal use only.
-
getInstance
Get the instance of the main class.- Returns:
- The main class.
-
loadFiles
public void loadFiles()Loaded needed files. -
isDebug
public boolean isDebug()If the plugin is in debug mode.- Returns:
- If the plugin is in debug mode.
-
getCustomItemManager
Get the custom item manager.- Returns:
- The custom item manager.
-
getSignCommandsHandler
- Returns:
- The commands config handler
-
getNpcHandler
- Returns:
- The NPC config handler
-
getAddonHandler
Get the addon handler for the plugin.- Returns:
- The addon handler.
-
getStructureSignHandler
Get the handler for registering custom structure signs.- Returns:
- The handler for registering custom structure signs.
-
getMythicalMobHook
Get the hook for mythical mobs.- Returns:
- The hook for mythical mobs.
-
getCitizensNpcHook
Get the hook for citizens.- Returns:
- The hook for citizens.
-