Class CustomContainerData

java.lang.Object
com.mclds.plugins.mcldscustomcontainer.CustomContainerData
All Implemented Interfaces:
org.bukkit.configuration.serialization.ConfigurationSerializable, org.bukkit.inventory.InventoryHolder

public class CustomContainerData extends Object implements org.bukkit.configuration.serialization.ConfigurationSerializable, org.bukkit.inventory.InventoryHolder
  • Field Details

    • location

      public org.bukkit.Location location
    • owner

      public org.bukkit.OfflinePlayer owner
    • type

      public ContainerType type
    • direction

      public org.bukkit.util.Vector direction
      创建时点击的箱子方向
    • createAt

      public long createAt
  • Constructor Details

    • CustomContainerData

      public CustomContainerData()
  • Method Details

    • getContainer

      @Nullable public @Nullable CustomContainer getContainer()
    • checkContainer

      public boolean checkContainer(org.bukkit.entity.Player viewer)
      操作之前先检查容器是否存在
    • getInventory

      @NotNull public @NotNull org.bukkit.inventory.Inventory getInventory()
      Specified by:
      getInventory in interface org.bukkit.inventory.InventoryHolder
    • getSignBlock

      public org.bukkit.block.Block getSignBlock()
    • getContainerBlock

      public org.bukkit.block.Block getContainerBlock()
    • isOwner

      public boolean isOwner(org.bukkit.OfflinePlayer player)
    • serialize

      @NotNull public @NotNull Map<String,Object> serialize()
      Specified by:
      serialize in interface org.bukkit.configuration.serialization.ConfigurationSerializable
    • deserialize

      public static CustomContainerData deserialize(String json)
    • deserialize

      public static CustomContainerData deserialize(Map<String,Object> map)
    • updateContainerSign

      public boolean updateContainerSign()
      更新牌子信息
    • getItemExtraMetaDesc

      public static String getItemExtraMetaDesc(org.bukkit.inventory.ItemStack stack)
    • getLevelCharacter

      public static String getLevelCharacter(int level)