Class BundleMetaMock

java.lang.Object
be.seeseemelk.mockbukkit.inventory.meta.ItemMetaMock
be.seeseemelk.mockbukkit.inventory.meta.BundleMetaMock
All Implemented Interfaces:
Cloneable, org.bukkit.configuration.serialization.ConfigurationSerializable, org.bukkit.inventory.meta.BundleMeta, org.bukkit.inventory.meta.Damageable, org.bukkit.inventory.meta.ItemMeta, org.bukkit.inventory.meta.Repairable, org.bukkit.persistence.PersistentDataHolder

public class BundleMetaMock extends ItemMetaMock implements org.bukkit.inventory.meta.BundleMeta
Mock implementation of a BundleMeta.
See Also:
  • Constructor Details

    • BundleMetaMock

      public BundleMetaMock()
      Constructs a new BundleMetaMock.
    • BundleMetaMock

      public BundleMetaMock(@NotNull @NotNull org.bukkit.inventory.meta.BundleMeta meta)
      Constructs a new BundleMetaMock, cloning the data from another.
      Parameters:
      meta - The meta to clone.
  • Method Details

    • hasItems

      public boolean hasItems()
      Specified by:
      hasItems in interface org.bukkit.inventory.meta.BundleMeta
    • getItems

      @NotNull public @NotNull List<org.bukkit.inventory.ItemStack> getItems()
      Specified by:
      getItems in interface org.bukkit.inventory.meta.BundleMeta
    • setItems

      public void setItems(@Nullable @Nullable List<org.bukkit.inventory.ItemStack> items)
      Specified by:
      setItems in interface org.bukkit.inventory.meta.BundleMeta
    • addItem

      public void addItem(@NotNull @NotNull org.bukkit.inventory.ItemStack item)
      Specified by:
      addItem in interface org.bukkit.inventory.meta.BundleMeta
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ItemMetaMock
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class ItemMetaMock
    • clone

      @NotNull public @NotNull BundleMetaMock clone()
      Specified by:
      clone in interface org.bukkit.inventory.meta.Damageable
      Specified by:
      clone in interface org.bukkit.inventory.meta.ItemMeta
      Specified by:
      clone in interface org.bukkit.inventory.meta.Repairable
      Overrides:
      clone in class ItemMetaMock
    • deserialize

      @NotNull public static @NotNull BundleMetaMock deserialize(@NotNull @NotNull Map<String,Object> args)
      Required method for Bukkit deserialization.
      Parameters:
      args - A serialized BundleMetaMock object in a Map<String, Object> format.
      Returns:
      A new instance of the BundleMetaMock class.
    • serialize

      @NotNull public @NotNull Map<String,Object> serialize()
      Serializes the properties of an BundleMetaMock to a HashMap. Unimplemented properties are not present in the map.
      Specified by:
      serialize in interface org.bukkit.configuration.serialization.ConfigurationSerializable
      Overrides:
      serialize in class ItemMetaMock
      Returns:
      A HashMap of String, Object pairs representing the BundleMetaMock.
    • getTypeName

      protected String getTypeName()
      Overrides:
      getTypeName in class ItemMetaMock