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 datas.
Version:
3.1.1
Author:
Andross
  • Field Details

  • Constructor Details

    • Items

      public Items()
  • Method Details

    • get

      @Nullable public Map<BanAction,BanActionData> get(@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

      @Nullable public BanActionData get(@NotNull BannedItem bannedItem, @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

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

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

      public int getTotal()
      Get the total amount of items added
      Returns:
      the total amount of items added
    • getAllActions

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