mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Sign: Do not allow edits by any player except the one who placed it, and only while that player is online
signs now become finalized if: - the player quits and rejoins (because the entity runtime ID of the player will not be the same) - the chunk is unloaded and reloaded (because the tagged entity runtime ID is not saved). closes #4198
This commit is contained in:
@ -68,7 +68,10 @@ class SignPost extends Transparent{
|
||||
$this->getLevelNonNull()->setBlock($blockReplace, BlockFactory::get(Block::WALL_SIGN, $this->meta), true);
|
||||
}
|
||||
|
||||
Tile::createTile(Tile::SIGN, $this->getLevelNonNull(), TileSign::createNBT($this, $face, $item, $player));
|
||||
$sign = Tile::createTile(Tile::SIGN, $this->getLevelNonNull(), TileSign::createNBT($this, $face, $item, $player));
|
||||
if($player !== null && $sign instanceof TileSign){
|
||||
$sign->setEditorEntityRuntimeId($player->getId());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user