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.EntityReturns theEntityof this classgetIntegerValue(String key)Gets aIntegervalue from the linked entitiesPersistentDataContainergetStringValue(String key)Gets aStringvalue from the linked entitiesPersistentDataContainervoidsetHologram(String message)Sets the name above the linked entities headvoidsetIntegerValue(String key, int value)Sets aIntegervalue for the linked entityvoidsetStringValue(String key, String value)Sets aStringvalue 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- AStringColors automatically get parsed here if using the ampersand symbol
-
setStringValue
Sets aStringvalue for the linked entityPersistentDataContainer -
setIntegerValue
Sets aIntegervalue for the linked entity -
getStringValue
Gets aStringvalue from the linked entitiesPersistentDataContainer -
getIntegerValue
Gets aIntegervalue from the linked entitiesPersistentDataContainer -
getEntity
public org.bukkit.entity.Entity getEntity()Returns theEntityof this class- Returns:
- The
Entityof this class
-