Class MapMetaMock

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

public class MapMetaMock extends ItemMetaMock implements org.bukkit.inventory.meta.MapMeta
Mock implementation of an MapMeta.
See Also:
  • Constructor Details

    • MapMetaMock

      public MapMetaMock()
      Constructs a new MapMetaMock.
    • MapMetaMock

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

    • hasMapId

      public boolean hasMapId()
      Specified by:
      hasMapId in interface org.bukkit.inventory.meta.MapMeta
    • getMapId

      public int getMapId()
      Specified by:
      getMapId in interface org.bukkit.inventory.meta.MapMeta
    • setMapId

      public void setMapId(int id)
      Specified by:
      setMapId in interface org.bukkit.inventory.meta.MapMeta
    • hasMapView

      public boolean hasMapView()
      Specified by:
      hasMapView in interface org.bukkit.inventory.meta.MapMeta
    • getMapView

      @Nullable public @Nullable org.bukkit.map.MapView getMapView()
      Specified by:
      getMapView in interface org.bukkit.inventory.meta.MapMeta
    • setMapView

      public void setMapView(org.bukkit.map.MapView map)
      Specified by:
      setMapView in interface org.bukkit.inventory.meta.MapMeta
    • isScaling

      public boolean isScaling()
      Specified by:
      isScaling in interface org.bukkit.inventory.meta.MapMeta
    • setScaling

      public void setScaling(boolean scaling)
      Specified by:
      setScaling in interface org.bukkit.inventory.meta.MapMeta
    • hasLocationName

      public boolean hasLocationName()
      Specified by:
      hasLocationName in interface org.bukkit.inventory.meta.MapMeta
    • getLocationName

      @Nullable public @Nullable String getLocationName()
      Specified by:
      getLocationName in interface org.bukkit.inventory.meta.MapMeta
    • setLocationName

      public void setLocationName(@Nullable @Nullable String name)
      Specified by:
      setLocationName in interface org.bukkit.inventory.meta.MapMeta
    • hasColor

      public boolean hasColor()
      Specified by:
      hasColor in interface org.bukkit.inventory.meta.MapMeta
    • getColor

      @Nullable public @Nullable org.bukkit.Color getColor()
      Specified by:
      getColor in interface org.bukkit.inventory.meta.MapMeta
    • setColor

      public void setColor(@Nullable @Nullable org.bukkit.Color color)
      Specified by:
      setColor in interface org.bukkit.inventory.meta.MapMeta
    • hashCode

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

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

      @NotNull public @NotNull MapMetaMock 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.MapMeta
      Specified by:
      clone in interface org.bukkit.inventory.meta.Repairable
      Overrides:
      clone in class ItemMetaMock
    • deserialize

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

      @NotNull public @NotNull Map<String,Object> serialize()
      Serializes the properties of an MapMetaMock 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 MapMetaMock.
    • getTypeName

      protected String getTypeName()
      Overrides:
      getTypeName in class ItemMetaMock