small fixes

This commit is contained in:
GameHerobrine 2023-01-15 00:00:37 +03:00
parent 8b9cdc6307
commit 0e3f78fbf7
5 changed files with 29 additions and 40 deletions

View file

@ -306,7 +306,10 @@ class BlockAPI{
$output .= "Giving ".$item->count." of ".$item->getName()." (".$item->getID().":".$item->getMetadata().") to ".$player->username;
break;
}else{
$item = self::fromString($args[0]);
$item = self::fromString($args[0]);
if(!($issuer instanceof Player)){
return "You cant give an item to a non-player.";
}
if(($issuer->gamemode & 0x01) === 0x01){
$output .= "You are in creative mode.";
break;