This repository was archived by the owner on May 24, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11name : SimpleAuth
22main : SimpleAuth\SimpleAuth
3- version : 1.7.1
4- api : 1.12 .0
3+ version : 1.7.2
4+ api : 2.0 .0
55load : STARTUP
66author : PocketMine Team
77authors : [shoghicp]
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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 );
Original file line number Diff line number Diff 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 ){
You can’t perform that action at this time.
0 commit comments