mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
Fixed gamemode issues
This commit is contained in:
parent
7723e3784f
commit
0fa3dded89
1 changed files with 4 additions and 2 deletions
|
|
@ -181,14 +181,16 @@ class Player{
|
|||
public function eventHandler($data, $event){
|
||||
switch($event){
|
||||
case "player.block.place":
|
||||
if($data["eid"] === $this->eid){
|
||||
if($data["eid"] === $this->eid and $this->server->gamemode === 0){
|
||||
$this->removeItem($data["original"][0], $data["original"][1], 1);
|
||||
}
|
||||
break;
|
||||
case "player.pickup":
|
||||
if($data["eid"] === $this->eid){
|
||||
$data["eid"] = 0;
|
||||
$this->addItem($data["entity"]->type, $data["entity"]->meta, $data["entity"]->stack);
|
||||
if($this->server->gamemode === 0){
|
||||
$this->addItem($data["entity"]->type, $data["entity"]->meta, $data["entity"]->stack);
|
||||
}
|
||||
}
|
||||
$this->dataPacket(MC_TAKE_ITEM_ENTITY, $data);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue