Skip to content
This repository was archived by the owner on May 24, 2018. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/SimpleAuth/task/ShowMessageTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ public function getPlugin(){
}

public function addPlayer(Player $player){
$this->playerList[$player->getUniqueId()] = $player;
$this->playerList[spl_object_hash($player->getUniqueId())] = $player;
}

public function removePlayer(Player $player){
unset($this->playerList[$player->getUniqueId()]);
$this->playerList[spl_object_hash($player->getUniqueId())] = null;
}

public function onRun($currentTick){
Expand All @@ -53,8 +53,10 @@ public function onRun($currentTick){
}

foreach($this->playerList as $player){
if($player==null){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the code style.

continue;
}
$player->sendPopup(TextFormat::ITALIC . TextFormat::GRAY . $this->getPlugin()->getMessage("join.popup"));
}
}

}
}