From 7fc22d322735251c58bc62f0eef8703ba67b874a Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 14 Jul 2018 16:05:46 +0100 Subject: [PATCH] Entity: fixed setNameTagAlwaysVisible() mojang >.< this doesn't fix the problem of invisibility making nametags hidden though. --- src/pocketmine/entity/Entity.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index ddde4903f..fd673095f 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -169,7 +169,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{ public const DATA_LIMITED_LIFE = 77; public const DATA_ARMOR_STAND_POSE_INDEX = 78; //int public const DATA_ENDER_CRYSTAL_TIME_OFFSET = 79; //int - /* 80 (byte) something to do with nametag visibility? */ + public const DATA_ALWAYS_SHOW_NAMETAG = 80; //byte: -1 = default, 0 = only when looked at, 1 = always public const DATA_COLOR_2 = 81; //byte /* 82 (unknown) */ public const DATA_SCORE_TAG = 83; //string @@ -606,7 +606,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{ * @param bool $value */ public function setNameTagAlwaysVisible(bool $value = true) : void{ - $this->setGenericFlag(self::DATA_FLAG_ALWAYS_SHOW_NAMETAG, $value); + $this->propertyManager->setByte(self::DATA_ALWAYS_SHOW_NAMETAG, $value ? 1 : 0); } /**