Class AbilityItemUtility
java.lang.Object
org.woftnw.eof.AbilityItemUtility
A utility class for creating ability items.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull org.bukkit.inventory.ItemStackcreateItem(org.bukkit.plugin.java.JavaPlugin plugin, @Nullable org.bukkit.Material material, @NonNull net.kyori.adventure.text.TextComponent name, @NonNull Tribe tribe, @NonNull Activation activation, @NonNull AbilityEffect[] effects, @Nullable String itemModel) Create an ItemStack for an ability item.static @NonNull org.bukkit.inventory.ItemStackcreateItem(org.bukkit.plugin.java.JavaPlugin plugin, @Nullable org.bukkit.Material material, @NonNull net.kyori.adventure.text.TextComponent name, @NonNull Tribe tribe, @NonNull Activation activation, @NonNull AbilityEffect[] effects, @Nullable String itemModel, int cooldown) Create an ItemStack for an ability item.
-
Constructor Details
-
AbilityItemUtility
public AbilityItemUtility()
-
-
Method Details
-
createItem
public static @NonNull org.bukkit.inventory.ItemStack createItem(org.bukkit.plugin.java.JavaPlugin plugin, @Nullable org.bukkit.Material material, @NonNull net.kyori.adventure.text.TextComponent name, @NonNull Tribe tribe, @NonNull Activation activation, @NonNull AbilityEffect[] effects, @Nullable String itemModel, int cooldown) Create an ItemStack for an ability item.- Parameters:
plugin- The origin plugin instance.material- The base material. This is shown if no resource pack is available.name- The name of the ability.tribe- The tribe this ability belongs to.activation- The activation type of the ability.effects- The AbilityEffects.itemModel- The path of the custom item model to use.cooldown- The cooldown length of the ability.- Returns:
- The resulting ItemStack.
-
createItem
public static @NonNull org.bukkit.inventory.ItemStack createItem(org.bukkit.plugin.java.JavaPlugin plugin, @Nullable org.bukkit.Material material, @NonNull net.kyori.adventure.text.TextComponent name, @NonNull Tribe tribe, @NonNull Activation activation, @NonNull AbilityEffect[] effects, @Nullable String itemModel) Create an ItemStack for an ability item.- Parameters:
plugin- The origin plugin instance.material- The base material. This is shown if no resource pack is available.name- The name of the ability.tribe- The tribe this ability belongs to.activation- The activation type of the ability.effects- The AbilityEffects.itemModel- The path of the custom item model to use.- Returns:
- The resulting ItemStack.
-