Class CustomBannedItem

java.lang.Object
fr.andross.banitem.items.BannedItem
fr.andross.banitem.items.CustomBannedItem
All Implemented Interfaces:
ICustomName

public final class CustomBannedItem extends BannedItem implements ICustomName
An item wrapper, which store custom item meta
Version:
3.3.2
Author:
Andross
  • Constructor Details

    • CustomBannedItem

      public CustomBannedItem(@NotNull String name, @NotNull org.bukkit.configuration.ConfigurationSection section, @NotNull Debug debug)
  • Method Details

    • matches

      public boolean matches(@NotNull org.bukkit.inventory.ItemStack item)
      Comparing the ItemMeta of the item with the item meta stored
      Parameters:
      item - the item stack to compare
      Returns:
      true if the item meta matches, otherwise false
    • getName

      @NotNull public String getName()
      Get the custom banned item name from customitems.yml
      Specified by:
      getName in interface ICustomName
      Returns:
      the custom banned item name from customitems.yml
    • getMaterials

      @NotNull public Set<org.bukkit.Material> getMaterials()
      Get the materials represented by this custom item
      Returns:
      set of materials
    • getMeta

      @NotNull public Map<MetaType,MetaTypeComparator> getMeta()
      Get the map of meta to compare
      Returns:
      the map of meta to compare
    • isValid

      public boolean isValid()
      If the custom item is correctly loaded
      Returns:
      if the custom item is correctly loaded
    • isReverted

      public boolean isReverted()
      If the custom item match is reverted
      Returns:
      if the custom item match is reverted
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class BannedItem
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class BannedItem