mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Obligatory Creative mode item enforcement
This commit is contained in:
parent
bc80c01348
commit
fd8166c836
4 changed files with 137 additions and 16 deletions
|
|
@ -60,7 +60,9 @@ class PaintingItem extends Item{
|
|||
$server = ServerAPI::request();
|
||||
$e = $server->api->entity->add(ENTITY_OBJECT, OBJECT_PAINTING, $data);
|
||||
$server->api->entity->spawnToAll($e->eid);
|
||||
$player->removeItem($this->getID(), $this->getMetadata(), 1);
|
||||
if($player->gamemode !== CREATIVE){
|
||||
$player->removeItem($this->getID(), $this->getMetadata(), 1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue