Package fr.andross.banitem.items
Class CustomBannedItem
java.lang.Object
fr.andross.banitem.items.BannedItem
fr.andross.banitem.items.CustomBannedItem
- All Implemented Interfaces:
ICustomName
An item wrapper, which store custom item meta
- Version:
- 3.3.2
- Author:
- Andross
-
Constructor Summary
ConstructorDescriptionCustomBannedItem
(String name, org.bukkit.configuration.ConfigurationSection section, Debug debug) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Set<org.bukkit.Material>
Get the materials represented by this custom itemgetMeta()
Get the map of meta to comparegetName()
Get the custom banned item name from customitems.ymlint
hashCode()
boolean
If the custom item match is revertedboolean
isValid()
If the custom item is correctly loadedboolean
matches
(org.bukkit.inventory.ItemStack item) Comparing the ItemMeta of the item with the item meta storedMethods inherited from class fr.andross.banitem.items.BannedItem
getData, getItemMeta, getItemStack, getType, toItemStack
-
Constructor Details
-
CustomBannedItem
-
-
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
Get the custom banned item name from customitems.yml- Specified by:
getName
in interfaceICustomName
- Returns:
- the custom banned item name from customitems.yml
-
getMaterials
Get the materials represented by this custom item- Returns:
- set of materials
-
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
- Overrides:
equals
in classBannedItem
-
hashCode
public int hashCode()- Overrides:
hashCode
in classBannedItem
-