Players can no longer be given air (causes client crash) through /give.

Fixes #567.
This commit is contained in:
williamtdr 2013-07-31 22:08:34 -05:00
parent f3f6828699
commit 330e06b892

View File

@ -227,6 +227,10 @@ class BlockAPI{
$output .= "Player is in creative mode.\n";
break;
}
if($item->getID() == 0) {
$output .= "You cannot give an air block to a player.\n";
break;
}
$player->addItem($item->getID(), $item->getMetadata(), $item->count);
$output .= "Giving ".$item->count." of ".$item->getName()." (".$item->getID().":".$item->getMetadata().") to ".$player->username."\n";
}else{