Skip to content
This repository was archived by the owner on May 24, 2018. It is now read-only.
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/SimpleAuth/EventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function __construct(SimpleAuth $plugin){
public function onPlayerJoin(PlayerJoinEvent $event){
if($this->plugin->getConfig()->get("authenticateByLastUniqueId") === true and $event->getPlayer()->hasPermission("simpleauth.lastid")){
$config = $this->plugin->getDataProvider()->getPlayer($event->getPlayer());
if($config !== null and $config["lastip"] === $event->getPlayer()->getUniqueId()){
if($config !== null and $config["lastip"] === $event->getPlayer()->getUniqueId()->toString()){
$this->plugin->authenticatePlayer($event->getPlayer());
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/SimpleAuth/SimpleAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function authenticatePlayer(Player $player){
$player->removeAttachment($attachment);
unset($this->needAuth[spl_object_hash($player)]);
}
$this->provider->updatePlayer($player, $player->getUniqueId(), time());
$this->provider->updatePlayer($player, $player->getUniqueId()->toString(), time());
$player->sendMessage(TextFormat::GREEN . $this->getMessage("login.success"));

$this->getMessageTask()->removePlayer($player);
Expand Down
4 changes: 2 additions & 2 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[$player->getUniqueId()->toString()] = $player;
}

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

public function onRun($currentTick){
Expand Down