Class Items

java.lang.Object
fr.andross.banitem.database.items.Items
Direct Known Subclasses:
WhitelistedWorld

public class Items extends Object
Map that store all the banned items, with their actions and actions data.
Version:
3.1.1
Author:
Andross
  • Field Details Link icon

  • Constructor Details Link icon

    • Items Link icon

      public Items()
      Constructor
  • Method Details Link icon

    • get Link icon

      @Nullable public @Nullable Map<BanAction,BanActionData> get(@NotNull @NotNull BannedItem bannedItem)
      Get a map of actions and their respective data for a banned item object, if present.
      Parameters:
      bannedItem - the banned item
      Returns:
      a map of actions and data if found, otherwise null.
    • get Link icon

      @Nullable public @Nullable BanActionData get(@NotNull @NotNull BannedItem bannedItem, @NotNull @NotNull BanAction action)
      Get the BanActionData of the BannedItem for the said action, if present.
      Parameters:
      bannedItem - the banned item
      action - the action
      Returns:
      the BanActionData if found, otherwise null.
    • getItems Link icon

      @NotNull public @NotNull Map<BannedItem,Map<BanAction,BanActionData>> getItems()
      Get the items map (include normal and meta items).
      Returns:
      the items map
    • getCustomItems Link icon

      @NotNull public @NotNull Map<CustomBannedItem,Map<BanAction,BanActionData>> getCustomItems()
      Get the custom items map.
      Returns:
      the custom items map
    • getTotalAmountOfItems Link icon

      public int getTotalAmountOfItems()
      Get the total amount of items added.
      Returns:
      the total amount of items added
    • getAllActions Link icon

      @NotNull public @NotNull @Unmodifiable Set<BanAction> getAllActions()
      Get all actions saved for the items, unmodifiable.
      Returns:
      all actions saved for the items