Package fr.maxlego08.menu.api.loader
Interface ButtonLoader
public interface ButtonLoader
The ButtonLoader interface defines methods for loading buttons and related configurations.
Examples of implementations can be found in:
You must specify a unique name for your button, typically in the format 'your plugin name'_'button name'.
For example, if your plugin is called "test" and your button is called "magic", the name should be 'test_magic'.
You can then return a new instance of your button with the essential elements initialized.
-
Method Summary
Modifier and TypeMethodDescriptionGets the class that will be used for the button.getName()Gets the name of the button.org.bukkit.plugin.PluginGets the plugin from which the button loader originates.load(org.bukkit.configuration.file.YamlConfiguration configuration, String path, DefaultButtonValue defaultButtonValue) Loads a button based on the provided configuration.Loads a list of strings and transforms it into integers, supporting various slot formats.
-
Method Details
-
loadSlot
Loads a list of strings and transforms it into integers, supporting various slot formats. More information here.- Parameters:
slotsAsString- List of slot strings- Returns:
- List of slots as integers
-
getButton
Gets the class that will be used for the button.- Returns:
- The button class.
-
getName
String getName()Gets the name of the button.- Returns:
- The button name.
-
getPlugin
org.bukkit.plugin.Plugin getPlugin()Gets the plugin from which the button loader originates.- Returns:
- The plugin.
-