From bdb77f6e81572b465a199eaad6dae7153027b611 Mon Sep 17 00:00:00 2001 From: Robb Jones Date: Tue, 31 Oct 2017 16:42:14 +0000 Subject: [PATCH] Corrected variable in conversion code --- src/Ad5001/BetterGen/Main.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Ad5001/BetterGen/Main.php b/src/Ad5001/BetterGen/Main.php index 4ee740e..4a3dc1e 100644 --- a/src/Ad5001/BetterGen/Main.php +++ b/src/Ad5001/BetterGen/Main.php @@ -127,13 +127,13 @@ class Main extends PluginBase implements Listener { return true; } $generatorName = strtolower($args[1]); - $parts = str_split($seed); + $parts = str_split($args[2]); foreach ($parts as $key=>$str) { if(is_numeric($str) == false && $str <> '-'){ $parts[$key] = ord($str); } - $seed = (int)implode("", $parts); } + $seed = (int)implode("", $parts); $options = []; break; default : // /createworld [generator = betternormal] [seed = rand()] [options(json)] @@ -145,13 +145,13 @@ class Main extends PluginBase implements Listener { } $generatorName = strtolower($args[1]); if ($args[2] == "rand") $args[2] = $this->generateRandomSeed(); - $parts = str_split($seed); + $parts = str_split($args[2]); foreach ($parts as $key=>$str) { if(is_numeric($str) == false && $str <> '-'){ $parts[$key] = ord($str); } - $seed = (int)implode("", $parts); } + $seed = (int)implode("", $parts); unset($args[0], $args[1], $args[2]); $options = json_decode($args[3], true); if (!is_array($options)) {