Class CustomPlayer
java.lang.Object
dev.lone.itemsadder.api.CustomEntity
dev.lone.itemsadder.api.CustomPlayer
Wrapper for a custom player entity and player emote helpers.
-
Nested Class Summary
Nested classes/interfaces inherited from class CustomEntity
CustomEntity.Bone, CustomEntity.MountBone -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable CustomPlayerbyAlreadySpawned(Entity entity) Gets a custom player wrapper from an already spawned entity.Gets the skin/player name used to spawn this custom player.booleanplayAnimation(String emoteName) Plays an emote animation on this custom player.static voidPlays an emote on a real player.static CustomPlayerSpawns a custom player entityvoidStops the current animation on this custom player.static voidStops the current emote played by a real player.Methods inherited from class CustomEntity
addPassenger, addViewer, convert, convert, convert, convert, destroy, getAnimationsNames, getAnimationsNames, getBone, getBones, getEntity, getFrustumCulling, getId, getLocation, getLoot, getLoot, getLoot, getMountBoneByPassenger, getMountBones, getNamespace, getNamespacedID, getNamespacedIdsInRegistry, getPassengers, getType, hasAnimation, hasAnimation, hasMountBones, hasPassenger, hasPassenger, isCustomEntity, isCustomEntity, isInRegistry, isPlayingAnimation, playAnimation, playDamageEffect, removePassenger, removeViewer, respawn, setColorAllBones, setEnchantedAllBones, setFrustumCulling, spawn, spawn, spawn, spawn, teleport
-
Method Details
-
getPlayerName
Gets the skin/player name used to spawn this custom player.- Returns:
- the player name or skin identifier.
-
playAnimation
Plays an emote animation on this custom player.- Overrides:
playAnimationin classCustomEntity- Parameters:
emoteName- the emote animation name.- Returns:
- true if the animation was started.
-
stopAnimation
public void stopAnimation()Stops the current animation on this custom player.- Overrides:
stopAnimationin classCustomEntity
-
spawn
Spawns a custom player entity- Parameters:
playerSkin- can be a player name, a mineskin.org url and a signed texture string.location- the location where you want to spawn the entity- Returns:
- the entity wrapper
-
byAlreadySpawned
Gets a custom player wrapper from an already spawned entity.- Parameters:
entity- the Bukkit entity to check.- Returns:
- the custom player wrapper, or null if the entity is not a custom player.
-
playEmote
-
stopEmote
Stops the current emote played by a real player.- Parameters:
player- the player.
-