new ai task, fixes of old ones, php8 fixes

This commit is contained in:
GameHerobrine 2022-12-24 22:42:23 +03:00
parent a907a7cf5e
commit 80bdddb817
13 changed files with 1581 additions and 1458 deletions

View file

@ -72,8 +72,8 @@ class EntityAPI{
}
elseif(is_numeric($args[1])){//summon <mob> [amount]
$amount = (int) $args[1];
if($amount > 25){
$output .= "Cannot spawn > 25 mobs";
if($amount > 100){
$output .= "Cannot spawn > 100 mobs";
break;
}
$isBaby = false;

View file

@ -92,7 +92,7 @@ class TimeAPI{
case "day":
case "sunset":
case "night":
if(substr($args[1], 0, 2) === "w:"){
if(count($args) > 1 && substr($args[1], 0, 2) === "w:"){
$levelName = preg_replace("/w:/", "", $args[1]);
$level = $this->server->api->level->get($levelName);
if($level instanceof Level){