mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Fixed "player.interact" event only being fired with weird conditions
This commit is contained in:
parent
d552042094
commit
34ca8baa29
3 changed files with 15 additions and 13 deletions
|
|
@ -963,7 +963,7 @@ class Player{
|
|||
break;
|
||||
}elseif($target->class === ENTITY_PLAYER and ($this->server->api->getProperty("pvp") == false or $this->server->difficulty <= 0 or ($target->player->gamemode & 0x01) === 0x01)){
|
||||
break;
|
||||
}elseif($this->handle("player.interact", $data) !== false){
|
||||
}elseif($this->server->handle("player.interact", $data) !== false){
|
||||
switch($this->equipment->getID()){
|
||||
case WOODEN_SWORD:
|
||||
case GOLD_SWORD:
|
||||
|
|
@ -1223,7 +1223,7 @@ class Player{
|
|||
}*/
|
||||
$inv = array();
|
||||
foreach($this->inventory as $s => $data){
|
||||
if($data[0] > 0 and $data[2] >= 0){
|
||||
if($data[0] > AIR and $data[2] >= 0){
|
||||
$inv[] = BlockAPI::getItem($data[0], $data[1], $data[2]);
|
||||
}else{
|
||||
$inv[] = BlockAPI::getItem(AIR, 0, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue