Update SetNameTagVisibleTask.php

This commit is contained in:
djdisodo 2018-06-10 17:43:09 +09:00 committed by GitHub
parent bbec6c1dbf
commit daf7e8b52b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,7 +18,7 @@ class SetNameTagVisibleTask extends \pocketmine\scheduler\Task {
@return void
*/
public function onRun($tick) {
foreach($this->getOwner()->getServer()->getLevels() as $level) {
foreach($this->owner->getServer()->getLevels() as $level) {
foreach ($level->getEntities() as $et) {
if(isset($et->namedtag->isUsedToFloat)) {
$et->setNameTagAlwaysVisible(true);