From d34f3f1af393d37fede6b2a39ff0860a6a0a29e1 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 2 Jan 2019 19:10:05 +0000 Subject: [PATCH 1/2] Add a terminal message for the crash strangler --- src/pocketmine/Server.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pocketmine/Server.php b/src/pocketmine/Server.php index a25caeaf8..31e170952 100644 --- a/src/pocketmine/Server.php +++ b/src/pocketmine/Server.php @@ -2254,6 +2254,7 @@ class Server{ //Force minimum uptime to be >= 120 seconds, to reduce the impact of spammy crash loops $spacing = ((int) \pocketmine\START_TIME) - time() + 120; if($spacing > 0){ + echo "--- Waiting $spacing seconds to throttle automatic restart (you can kill the process safely now) ---" . PHP_EOL; sleep($spacing); } @Utils::kill(getmypid()); From 658786f2f6690cbf0124801f2598d35d1bfa6c9a Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 2 Jan 2019 21:04:21 +0000 Subject: [PATCH 2/2] TitleCommand: fix off-by-one bug in "times" subcommand --- src/pocketmine/command/defaults/TitleCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/command/defaults/TitleCommand.php b/src/pocketmine/command/defaults/TitleCommand.php index 485cd07ee..7654c9d4f 100644 --- a/src/pocketmine/command/defaults/TitleCommand.php +++ b/src/pocketmine/command/defaults/TitleCommand.php @@ -82,7 +82,7 @@ class TitleCommand extends VanillaCommand{ $player->addActionBarMessage(implode(" ", array_slice($args, 2))); break; case "times": - if(count($args) < 4){ + if(count($args) < 5){ throw new InvalidCommandSyntaxException(); }