Package com.burchard36.api.utils
Class EntityWrapper
java.lang.Object
com.burchard36.api.utils.EntityWrapper
A simple wrapper to easily modify the data of a
Entity
-
Constructor Summary
ConstructorsConstructorDescriptionEntityWrapper(org.bukkit.entity.Entity entity)
Initialized this class with aEntity
-
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.entity.Entity
Returns theEntity
of this classgetIntegerValue(String key)
Gets aInteger
value from the linked entitiesPersistentDataContainer
getStringValue(String key)
Gets aString
value from the linked entitiesPersistentDataContainer
void
setHologram(String message)
Sets the name above the linked entities headvoid
setIntegerValue(String key, int value)
Sets aInteger
value for the linked entityvoid
setStringValue(String key, String value)
Sets aString
value for the linked entityPersistentDataContainer
-
Constructor Details
-
EntityWrapper
public EntityWrapper(org.bukkit.entity.Entity entity)Initialized this class with aEntity
- Parameters:
entity
- AEntity
-
-
Method Details
-
setHologram
Sets the name above the linked entities head- Parameters:
message
- AString
Colors automatically get parsed here if using the ampersand symbol
-
setStringValue
Sets aString
value for the linked entityPersistentDataContainer
-
setIntegerValue
Sets aInteger
value for the linked entity -
getStringValue
Gets aString
value from the linked entitiesPersistentDataContainer
-
getIntegerValue
Gets aInteger
value from the linked entitiesPersistentDataContainer
-
getEntity
public org.bukkit.entity.Entity getEntity()Returns theEntity
of this class- Returns:
- The
Entity
of this class
-