Class CraftEngine

java.lang.Object
com.ranull.graves.manager.EntityDataManager
dev.cwhead.GravesX.integration.CraftEngine
All Implemented Interfaces:
CustomItemStorageProvider

public final class CraftEngine extends EntityDataManager implements CustomItemStorageProvider
  • Constructor Details

  • Method Details

    • getProviderId

      public String getProviderId()
      Description copied from interface: CustomItemStorageProvider
      Unique identifier used as the serialization prefix. Example:
      CRAFTENGINE
      ORAXEN
      ITEMSADDER
      MMOITEMS
      
      Serialized format:
      PROVIDER_ID:encoded-item-id:base64-item
      
      Specified by:
      getProviderId in interface CustomItemStorageProvider
      Returns:
      provider identifier
    • getCraftEnginePlugin

      public org.bukkit.plugin.Plugin getCraftEnginePlugin()
    • registerListeners

      public void registerListeners()
    • unregisterListeners

      public void unregisterListeners()
    • isCustomItem

      public boolean isCustomItem(org.bukkit.inventory.ItemStack itemStack)
    • getCustomItemId

      public String getCustomItemId(org.bukkit.inventory.ItemStack itemStack)
      Description copied from interface: CustomItemStorageProvider
      Returns the custom item identifier for an item. Returning null indicates the item is not handled by this provider.
      Specified by:
      getCustomItemId in interface CustomItemStorageProvider
      Parameters:
      itemStack - item to inspect
      Returns:
      custom item identifier or null
    • rebuildCustomItem

      public org.bukkit.inventory.ItemStack rebuildCustomItem(String id, int amount)
      Description copied from interface: CustomItemStorageProvider
      Rebuilds an item from a previously stored custom item id.
      Specified by:
      rebuildCustomItem in interface CustomItemStorageProvider
      Parameters:
      id - custom item identifier
      amount - desired amount
      Returns:
      rebuilt item or null if restoration failed
    • createBlock

      public void createBlock(org.bukkit.Location location, Grave grave)
    • isCustomBlock

      public boolean isCustomBlock(org.bukkit.Location location)
    • isCustomBlock

      public boolean isCustomBlock(org.bukkit.block.Block block)
    • getCustomBlockId

      public String getCustomBlockId(org.bukkit.block.Block block)
    • removeBlock

      public void removeBlock(org.bukkit.Location location)
    • createFurniture

      public void createFurniture(org.bukkit.Location location, Grave grave)
    • removeFurniture

      public void removeFurniture(Grave grave)
    • removeFurniture

      public void removeFurniture(EntityData entityData)
    • removeFurniture

      public void removeFurniture(Map<EntityData, org.bukkit.entity.Entity> entityDataMap)
    • getGrave

      public Grave getGrave(org.bukkit.entity.Entity entity)
      Description copied from class: EntityDataManager
      Retrieves a grave for a specified entity.
      Overrides:
      getGrave in class EntityDataManager
      Parameters:
      entity - the entity for which to retrieve the grave.
      Returns:
      the grave, or null if not found.
    • getFurnitureBaseEntity

      public org.bukkit.entity.Entity getFurnitureBaseEntity(org.bukkit.entity.Entity entity)
    • isFurnitureEntity

      public boolean isFurnitureEntity(org.bukkit.entity.Entity entity)
    • getFurnitureId

      public String getFurnitureId(org.bukkit.entity.Entity entity)
    • hasFurniture

      public boolean hasFurniture(Grave grave)
    • hasBlock

      public boolean hasBlock(Grave grave)