Fixed a few errors in new Events

This commit is contained in:
Shoghi Cervantes 2014-03-14 02:02:31 +01:00
parent 68abafef7a
commit 3ff8ddc652
5 changed files with 5 additions and 5 deletions

View File

@ -1043,7 +1043,7 @@ class Player extends RealHuman{
return false; 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; return false;
} }

View File

@ -58,7 +58,7 @@ class BlockBreakEvent extends BlockEvent implements CancellableEvent{
} }
public function getItem(){ public function getItem(){
return $item; return $this->item;
} }
public function getInstaBreak(){ public function getInstaBreak(){

View File

@ -66,7 +66,7 @@ class BlockPlaceEvent extends BlockEvent implements CancellableEvent{
* @return mixed * @return mixed
*/ */
public function getItem(){ public function getItem(){
return $item; return $this->item;
} }
public function getBlockReplaced(){ public function getBlockReplaced(){

View File

@ -39,7 +39,7 @@ class PlayerGameModeChangeEvent extends PlayerEvent implements CancellableEvent{
public function __construct(Player $player, $newGamemode){ public function __construct(Player $player, $newGamemode){
$this->player = $player; $this->player = $player;
$this->gamemode = (int) $gamemode; $this->gamemode = (int) $newGamemode;
} }
public function getNewGamemode(){ public function getNewGamemode(){

View File

@ -57,7 +57,7 @@ class PlayerInteractEvent extends PlayerEvent implements CancellableEvent{
} }
public function getItem(){ public function getItem(){
return $item; return $this->item;
} }
public function getBlock(){ public function getBlock(){