From e273cfdc2a789ea8840e9515d1a19be88ed08187 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Tue, 26 May 2015 00:26:54 +0200 Subject: [PATCH] Version 1.7.1, fixed not being able to disable block, auth by last unique id not working --- plugin.yml | 2 +- src/SimpleAuth/EventListener.php | 2 +- src/SimpleAuth/SimpleAuth.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin.yml b/plugin.yml index 49e231c..76a6900 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,6 +1,6 @@ name: SimpleAuth main: SimpleAuth\SimpleAuth -version: 1.7.0 +version: 1.7.1 api: 1.12.0 load: STARTUP author: PocketMine Team diff --git a/src/SimpleAuth/EventListener.php b/src/SimpleAuth/EventListener.php index 53356fc..10fe512 100644 --- a/src/SimpleAuth/EventListener.php +++ b/src/SimpleAuth/EventListener.php @@ -48,7 +48,7 @@ public function __construct(SimpleAuth $plugin){ * @priority LOWEST */ public function onPlayerJoin(PlayerJoinEvent $event){ - if($this->plugin->getConfig()->get("authenticateByLastId") === true and $event->getPlayer()->hasPermission("simpleauth.lastid")){ + 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()){ $this->plugin->authenticatePlayer($event->getPlayer()); diff --git a/src/SimpleAuth/SimpleAuth.php b/src/SimpleAuth/SimpleAuth.php index af07ab3..5824cd7 100644 --- a/src/SimpleAuth/SimpleAuth.php +++ b/src/SimpleAuth/SimpleAuth.php @@ -140,7 +140,7 @@ public function deauthenticatePlayer(Player $player){ } public function tryAuthenticatePlayer(Player $player){ - if($this->isPlayerAuthenticated($player)){ + if($this->blockPlayers <= 0 and $this->isPlayerAuthenticated($player)){ return; }