mirror of
https://github.com/YouHaveTrouble/Enchantio.git
synced 2026-05-12 14:16:56 +00:00
add ability to configure active slots for the enchant
This commit is contained in:
@@ -9,6 +9,7 @@ import net.kyori.adventure.text.Component;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.inventory.EquipmentSlotGroup;
|
||||
import org.bukkit.inventory.ItemType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
@@ -44,12 +45,12 @@ public class ReplantingEnchant implements EnchantioEnchant {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Key getKey() {
|
||||
public @NotNull Key getKey() {
|
||||
return KEY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getDescription() {
|
||||
public @NotNull Component getDescription() {
|
||||
return Component.translatable("enchantio.enchant.replanting", "Replanting");
|
||||
}
|
||||
|
||||
@@ -69,27 +70,27 @@ public class ReplantingEnchant implements EnchantioEnchant {
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnchantmentRegistryEntry.EnchantmentCost getMinimumCost() {
|
||||
public EnchantmentRegistryEntry.@NotNull EnchantmentCost getMinimumCost() {
|
||||
return minimumCost;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnchantmentRegistryEntry.EnchantmentCost getMaximumCost() {
|
||||
public EnchantmentRegistryEntry.@NotNull EnchantmentCost getMaximumCost() {
|
||||
return maximumCost;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<EquipmentSlotGroup> getActiveSlots() {
|
||||
return Set.of(EquipmentSlotGroup.HAND);
|
||||
public @NotNull Iterable<EquipmentSlotGroup> getActiveSlots() {
|
||||
return Set.of(EquipmentSlotGroup.MAINHAND);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<TagEntry<ItemType>> getSupportedItems() {
|
||||
public @NotNull Set<TagEntry<ItemType>> getSupportedItems() {
|
||||
return supportedItemTags;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<TagKey<Enchantment>> getEnchantTagKeys() {
|
||||
public @NotNull Set<TagKey<Enchantment>> getEnchantTagKeys() {
|
||||
return Collections.unmodifiableSet(enchantTagKeys);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user