mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
small slimes cannot attack a player
This commit is contained in:
parent
447638816e
commit
612e09e0cc
3 changed files with 33 additions and 23 deletions
|
|
@ -22,6 +22,7 @@ class EntityAPI{
|
|||
|
||||
|
||||
public function commandHandler($cmd, $args, $issuer, $alias){
|
||||
//todo "MOB_".strtoupper($args[0]);
|
||||
$mob = [
|
||||
"chicken" => 10,
|
||||
"cow" => 11,
|
||||
|
|
@ -54,7 +55,8 @@ class EntityAPI{
|
|||
}
|
||||
|
||||
if(is_int($args[0])) $type = $args[0];
|
||||
else $type = $mob[strtolower($args[0])];
|
||||
elseif(isset($mob[strtolower($args[0])])) $type = $mob[strtolower($args[0])];
|
||||
else return "Unknown mob.";
|
||||
if($type < 10 || $type > 39){
|
||||
return "Unknown mob.";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue