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
ConstructorsConstructorDescriptionCustomBannedItem(@NotNull String name, @NotNull org.bukkit.configuration.ConfigurationSection section, @NotNull Debug debug) Represents a custom item, handled by BanItem, which will match specific meta types on the item. - 
Method Summary
Modifier and TypeMethodDescriptionboolean@NotNull Set<org.bukkit.Material> Get the materials represented by this custom item.@NotNull Map<MetaType, MetaTypeComparator> getMeta()Get the map of meta to compare.@NotNull StringgetName()Get the custom banned item name from customitems.yml.inthashCode()booleanIf the custom item match is reverted.booleanisValid()If the custom item is correctly loaded.booleanmatches(@NotNull BannedItem bannedItem) Comparing the ItemMeta of the item with the item meta stored.Methods inherited from class fr.andross.banitem.items.BannedItem
getData, getItemMeta, getItemStack, getType, toItemStack 
- 
Constructor Details
- 
CustomBannedItem
public CustomBannedItem(@NotNull @NotNull String name, @NotNull @NotNull org.bukkit.configuration.ConfigurationSection section, @NotNull @NotNull Debug debug) Represents a custom item, handled by BanItem, which will match specific meta types on the item.- Parameters:
 name- name of the custom itemsection- the section in the configuration filedebug- the debug
 
 - 
 - 
Method Details
- 
matches
Comparing the ItemMeta of the item with the item meta stored.- Parameters:
 bannedItem- the item to compare- Returns:
 - true if the item meta matches, otherwise false
 
 - 
getName
Get the custom banned item name from customitems.yml.- Specified by:
 getNamein 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:
 equalsin classBannedItem
 - 
hashCode
public int hashCode()- Overrides:
 hashCodein classBannedItem
 
 -