mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
removed 2 useless handlers from Player(they were not sending any data to player), fixed bug 158
This commit is contained in:
parent
a66176b75d
commit
ad17a6880a
6 changed files with 10 additions and 17 deletions
|
|
@ -667,16 +667,6 @@ class Player{
|
|||
*/
|
||||
public function eventHandler($data, $event){
|
||||
switch($event){
|
||||
case "player.touch":
|
||||
if($data["target"]->getID() === AIR){
|
||||
$this->useChunk(floor($data["target"]->x / 16), floor($data["target"]->z / 16));
|
||||
}
|
||||
break;
|
||||
case "player.block.break":
|
||||
if($data["target"]->getID() === AIR){
|
||||
$this->useChunk(floor($data["target"]->x / 16), floor($data["target"]->z / 16));
|
||||
}
|
||||
break;
|
||||
case "entity.link":
|
||||
$pk = new SetEntityLinkPacket();
|
||||
if($data["rider"] === $this->eid){
|
||||
|
|
@ -1451,8 +1441,6 @@ class Player{
|
|||
$this->evid[] = $this->server->event("player.pickup", [$this, "eventHandler"]);
|
||||
$this->evid[] = $this->server->event("tile.container.slot", [$this, "eventHandler"]);
|
||||
$this->evid[] = $this->server->event("tile.update", [$this, "eventHandler"]);
|
||||
$this->evid[] = $this->server->event("player.touch", [$this, "eventHandler"]);
|
||||
$this->evid[] = $this->server->event("player.block.break", [$this, "eventHandler"]);
|
||||
$this->lastMeasure = microtime(true);
|
||||
$this->server->schedule(50, [$this, "measureLag"], [], true);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue