From 0be10eeeaa7ad0b0e7f3e0862d1fa7ff269edeb6 Mon Sep 17 00:00:00 2001 From: xXSirGamesXx Date: Thu, 24 Aug 2017 12:21:34 -0400 Subject: [PATCH 1/5] FIx type hints --- src/HereAuth/Command/HereAuthCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/HereAuth/Command/HereAuthCommand.php b/src/HereAuth/Command/HereAuthCommand.php index dc2f80d..2b50370 100644 --- a/src/HereAuth/Command/HereAuthCommand.php +++ b/src/HereAuth/Command/HereAuthCommand.php @@ -49,11 +49,11 @@ public function getMessage(string $key, string $default) : string{ /** * @return HereAuth */ - public function getPlugin(){ + public function getPlugin() : \pocketmine\plugin\Plugin { return $this->main; } - public final function execute(CommandSender $sender, $commandLabel, array $args){ + public final function execute(CommandSender $sender, string $commandLabel, array $args) : bool{ try{ if(!$this->testPermission($sender)){ return false; From accb993d0cd0eb966d2a29522a1156f59b414920 Mon Sep 17 00:00:00 2001 From: xXSirGamesXx Date: Thu, 24 Aug 2017 12:22:40 -0400 Subject: [PATCH 2/5] Update HereAuthUserCommand.php --- src/HereAuth/Command/HereAuthUserCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HereAuth/Command/HereAuthUserCommand.php b/src/HereAuth/Command/HereAuthUserCommand.php index cd885ac..2a1d2b4 100644 --- a/src/HereAuth/Command/HereAuthUserCommand.php +++ b/src/HereAuth/Command/HereAuthUserCommand.php @@ -20,7 +20,7 @@ use pocketmine\Player; abstract class HereAuthUserCommand extends HereAuthCommand{ - public function testPermissionSilent(CommandSender $target){ + public function testPermissionSilent(CommandSender $target) : bool{ if(!parent::testPermissionSilent($target)){ return false; } From d1eef4bc376e1a64537d7bdcb1a620473ad2b747 Mon Sep 17 00:00:00 2001 From: xXSirGamesXx Date: Thu, 24 Aug 2017 12:23:12 -0400 Subject: [PATCH 3/5] Add files via upload --- src/HereAuth/Task/CheckImportThreadTask.php | 2 +- src/HereAuth/Task/CheckUserTimeoutTask.php | 2 +- src/HereAuth/Task/KickPlayerTask.php | 2 +- src/HereAuth/Task/RemindLoginTask.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/HereAuth/Task/CheckImportThreadTask.php b/src/HereAuth/Task/CheckImportThreadTask.php index 73b8592..ce3a116 100644 --- a/src/HereAuth/Task/CheckImportThreadTask.php +++ b/src/HereAuth/Task/CheckImportThreadTask.php @@ -26,7 +26,7 @@ public function __construct(HereAuth $main){ parent::__construct($this->main = $main); } - public function onRun($currentTick){ + public function onRun(int $currentTick){ $this->main->checkThread(); } } diff --git a/src/HereAuth/Task/CheckUserTimeoutTask.php b/src/HereAuth/Task/CheckUserTimeoutTask.php index 1905dc8..f542251 100644 --- a/src/HereAuth/Task/CheckUserTimeoutTask.php +++ b/src/HereAuth/Task/CheckUserTimeoutTask.php @@ -27,7 +27,7 @@ public function __construct(HereAuth $main){ $this->main->getServer()->getScheduler()->scheduleRepeatingTask($this, 20); } - public function onRun($currentTick){ + public function onRun(int $currentTick){ foreach($this->main->getUsers() as $user){ if(!$user->isPlaying() and microtime(true) - $user->getLoadTime() >= ($timeout = $this->main->getConfig()->getNested("Login.Timeout", 120))){ $this->main->getAuditLogger()->logTimeout(strtolower($user->getPlayer()->getName()), $user->getPlayer()->getAddress()); diff --git a/src/HereAuth/Task/KickPlayerTask.php b/src/HereAuth/Task/KickPlayerTask.php index 4e06e04..98138ee 100644 --- a/src/HereAuth/Task/KickPlayerTask.php +++ b/src/HereAuth/Task/KickPlayerTask.php @@ -38,7 +38,7 @@ public function __construct(HereAuth $main, $identifier, $reason){ $this->reason = $reason; } - public function onRun($currentTick){ + public function onRun(int $currentTick){ $player = $this->main->getPlayerById($this->identifier); if($player !== null){ $player->kick($this->reason, false); diff --git a/src/HereAuth/Task/RemindLoginTask.php b/src/HereAuth/Task/RemindLoginTask.php index 97a96d7..b044c31 100644 --- a/src/HereAuth/Task/RemindLoginTask.php +++ b/src/HereAuth/Task/RemindLoginTask.php @@ -40,7 +40,7 @@ public function __construct(HereAuth $main){ $main->getServer()->getScheduler()->scheduleDelayedRepeatingTask($this, $period, $period); } - public function onRun($currentTick){ + public function onRun(int $currentTick){ $reg = $this->main->getConfig()->getNested("RemindLogin.Message.Register", "Register please"); $log = $this->main->getConfig()->getNested("RemindLogin.Message.Login", "Login please"); if($this->type === "chat"){ From 50aebdb350e563d7a2b5dc86f86972033d81e6c5 Mon Sep 17 00:00:00 2001 From: xXSirGamesXx Date: Thu, 24 Aug 2017 15:14:43 -0400 Subject: [PATCH 4/5] Update HereAuthCommand.php --- src/HereAuth/Command/HereAuthCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/HereAuth/Command/HereAuthCommand.php b/src/HereAuth/Command/HereAuthCommand.php index 2b50370..7c01b66 100644 --- a/src/HereAuth/Command/HereAuthCommand.php +++ b/src/HereAuth/Command/HereAuthCommand.php @@ -19,6 +19,7 @@ use pocketmine\command\Command; use pocketmine\command\CommandSender; use pocketmine\command\PluginIdentifiableCommand; +use pocketmine\plugin\Plugin; abstract class HereAuthCommand extends Command implements PluginIdentifiableCommand{ /** @type HereAuth */ @@ -49,7 +50,7 @@ public function getMessage(string $key, string $default) : string{ /** * @return HereAuth */ - public function getPlugin() : \pocketmine\plugin\Plugin { + public function getPlugin() : Plugin { return $this->main; } From 9339e6221306baae475b91ce7806b38d2ab41b40 Mon Sep 17 00:00:00 2001 From: xXSirGamesXx Date: Sun, 27 Aug 2017 20:58:49 -0400 Subject: [PATCH 5/5] Update nowhere.json --- nowhere.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nowhere.json b/nowhere.json index 9f1fbf6..3efe30c 100644 --- a/nowhere.json +++ b/nowhere.json @@ -3,7 +3,7 @@ "author": "PEMapModder", "main": "HereAuth\\HereAuth", "api": [ - "3.0.0-ALPHA5" + "3.0.0-ALPHA7" ], "version": { "major": 1,