Skip to content
This repository was archived by the owner on May 24, 2018. It is now read-only.

Commit 2412979

Browse files
committed
Updated for api 2.0.0
1 parent e273cfd commit 2412979

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

plugin.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: SimpleAuth
22
main: SimpleAuth\SimpleAuth
3-
version: 1.7.1
4-
api: 1.12.0
3+
version: 1.7.2
4+
api: 2.0.0
55
load: STARTUP
66
author: PocketMine Team
77
authors: [shoghicp]

src/SimpleAuth/EventListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function __construct(SimpleAuth $plugin){
5050
public function onPlayerJoin(PlayerJoinEvent $event){
5151
if($this->plugin->getConfig()->get("authenticateByLastUniqueId") === true and $event->getPlayer()->hasPermission("simpleauth.lastid")){
5252
$config = $this->plugin->getDataProvider()->getPlayer($event->getPlayer());
53-
if($config !== null and $config["lastip"] === $event->getPlayer()->getUniqueId()){
53+
if($config !== null and $config["lastip"] === $event->getPlayer()->getUniqueId()->toString()){
5454
$this->plugin->authenticatePlayer($event->getPlayer());
5555
return;
5656
}

src/SimpleAuth/SimpleAuth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function authenticatePlayer(Player $player){
101101
$player->removeAttachment($attachment);
102102
unset($this->needAuth[spl_object_hash($player)]);
103103
}
104-
$this->provider->updatePlayer($player, $player->getUniqueId(), time());
104+
$this->provider->updatePlayer($player, $player->getUniqueId()->toString(), time());
105105
$player->sendMessage(TextFormat::GREEN . $this->getMessage("login.success"));
106106

107107
$this->getMessageTask()->removePlayer($player);

src/SimpleAuth/task/ShowMessageTask.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ public function getPlugin(){
3939
}
4040

4141
public function addPlayer(Player $player){
42-
$this->playerList[$player->getUniqueId()] = $player;
42+
$this->playerList[$player->getUniqueId()->toString()] = $player;
4343
}
4444

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

4949
public function onRun($currentTick){

0 commit comments

Comments
 (0)