Interface IWhitelistManager
public interface IWhitelistManager
-
Method Summary
Modifier and TypeMethodDescriptionGet the list of whitelisted items or entities.isWhitelist(org.bukkit.inventory.ItemStack itemStack) Check if an item is in the whitelist.voidregisterWhitelist(ItemChecker whitelist) Register an item or entity to the whitelist.voidUnregister all items or entities from the whitelist.voidunregisterWhitelist(ItemChecker whitelist) Unregister an item or entity from the whitelist.
-
Method Details
-
getWhitelist
List<ItemChecker> getWhitelist()Get the list of whitelisted items or entities.- Returns:
- a list of whitelisted items or entities.
-
registerWhitelist
Register an item or entity to the whitelist.- Parameters:
whitelist- the item or entity to be whitelisted.
-
unregisterWhitelist
Unregister an item or entity from the whitelist.- Parameters:
whitelist- the item or entity to be removed from the whitelist.
-
unregisterAll
void unregisterAll()Unregister all items or entities from the whitelist. -
isWhitelist
Check if an item is in the whitelist.- Parameters:
itemStack- the item to check.- Returns:
- an Optional containing the whitelist entry if the item is whitelisted, or an empty Optional if not.
-