mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 20:49:43 +00:00
/give compatible with "item-enforcement" = off
This commit is contained in:
parent
1885cdf3a2
commit
393f54fe28
1 changed files with 5 additions and 2 deletions
|
|
@ -151,8 +151,11 @@ class BlockAPI{
|
||||||
}
|
}
|
||||||
|
|
||||||
if($player instanceof Player){
|
if($player instanceof Player){
|
||||||
$player->addItem($item->getID(), $item->getMetadata(), $item->count);
|
if($this->server->api->getProperty("item-enforcement") === false){
|
||||||
//$this->drop(new Vector3($player->entity->x - 0.5, $player->entity->y, $player->entity->z - 0.5), $item, true);
|
$this->drop(new Vector3($player->entity->x - 0.5, $player->entity->y, $player->entity->z - 0.5), $item, true);
|
||||||
|
}else{
|
||||||
|
$player->addItem($item->getID(), $item->getMetadata(), $item->count);
|
||||||
|
}
|
||||||
$output .= "Giving ".$item->count." of ".$item->getName()." (".$item->getID().":".$item->getMetadata().") to ".$player->username."\n";
|
$output .= "Giving ".$item->count." of ".$item->getName()." (".$item->getID().":".$item->getMetadata().") to ".$player->username."\n";
|
||||||
}else{
|
}else{
|
||||||
$output .= "Unknown player\n";
|
$output .= "Unknown player\n";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue