Class EntityWrapper

java.lang.Object
com.burchard36.api.utils.EntityWrapper

public class EntityWrapper extends Object
A simple wrapper to easily modify the data of a Entity
  • Constructor Details

    • EntityWrapper

      public EntityWrapper(org.bukkit.entity.Entity entity)
      Initialized this class with a Entity
      Parameters:
      entity - A Entity
  • Method Details

    • setHologram

      public final void setHologram(String message)
      Sets the name above the linked entities head
      Parameters:
      message - A String Colors automatically get parsed here if using the ampersand symbol
    • setStringValue

      public final void setStringValue(String key, String value)
      Sets a String value for the linked entity PersistentDataContainer
      Parameters:
      key - A String key to store the value as
      value - A String value to store
    • setIntegerValue

      public final void setIntegerValue(String key, int value)
      Sets a Integer value for the linked entity
      Parameters:
      key - A String key to store the value as
      value - A Integer value to store
    • getStringValue

      public final String getStringValue(String key)
      Gets a String value from the linked entities PersistentDataContainer
      Parameters:
      key - A String key to search for the value under
      Returns:
      A String from the PersistentDataContainer, value will be null if none found
    • getIntegerValue

      public final Integer getIntegerValue(String key)
      Gets a Integer value from the linked entities PersistentDataContainer
      Parameters:
      key - A String key to search for the value under
      Returns:
      A Integer from the PersistentDataContainer, value will be null if none found
    • getEntity

      public org.bukkit.entity.Entity getEntity()
      Returns the Entity of this class
      Returns:
      The Entity of this class