Update SetNameTagVisibleTask.php

This commit is contained in:
djdisodo 2018-06-10 17:55:18 +09:00 committed by GitHub
parent c411bb63c0
commit 035c2e332f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,7 +20,7 @@ class SetNameTagVisibleTask extends \pocketmine\scheduler\Task {
public function onRun($tick) {
foreach($this->owner->getServer()->getLevels() as $level) {
foreach ($level->getEntities() as $et) {
if(isset($et->namedtag->isUsedToFloat)) {
if(isset($et->namedtag->getValue()->isUsedToFloat)){
$et->setNameTagAlwaysVisible(true);
$et->setNameTagVisible(true);
$et->setImmobile(true);