mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 18:59:00 +00:00
Fixed a few errors in new Events
This commit is contained in:
parent
68abafef7a
commit
3ff8ddc652
@ -1043,7 +1043,7 @@ class Player extends RealHuman{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(EventHandler::callEvent(new Event\Player\PlayerGameModeChangeEvent((int) $gm)) === Event\Event::DENY){
|
||||
if(EventHandler::callEvent(new Event\Player\PlayerGameModeChangeEvent($this, (int) $gm)) === Event\Event::DENY){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ class BlockBreakEvent extends BlockEvent implements CancellableEvent{
|
||||
}
|
||||
|
||||
public function getItem(){
|
||||
return $item;
|
||||
return $this->item;
|
||||
}
|
||||
|
||||
public function getInstaBreak(){
|
||||
|
@ -66,7 +66,7 @@ class BlockPlaceEvent extends BlockEvent implements CancellableEvent{
|
||||
* @return mixed
|
||||
*/
|
||||
public function getItem(){
|
||||
return $item;
|
||||
return $this->item;
|
||||
}
|
||||
|
||||
public function getBlockReplaced(){
|
||||
|
@ -39,7 +39,7 @@ class PlayerGameModeChangeEvent extends PlayerEvent implements CancellableEvent{
|
||||
|
||||
public function __construct(Player $player, $newGamemode){
|
||||
$this->player = $player;
|
||||
$this->gamemode = (int) $gamemode;
|
||||
$this->gamemode = (int) $newGamemode;
|
||||
}
|
||||
|
||||
public function getNewGamemode(){
|
||||
|
@ -57,7 +57,7 @@ class PlayerInteractEvent extends PlayerEvent implements CancellableEvent{
|
||||
}
|
||||
|
||||
public function getItem(){
|
||||
return $item;
|
||||
return $this->item;
|
||||
}
|
||||
|
||||
public function getBlock(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user