GenisysPro  for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
BlockPlaceEvent Class Reference

Public Member Functions

 __construct (Player $player, Block $blockPlace, Block $blockReplace, Block $blockAgainst, Item $item)
 
 getPlayer ()
 
 getItem ()
 
 getBlockReplaced ()
 
 getBlockAgainst ()
 
- Public Member Functions inherited from BlockEvent
 __construct (Block $block)
 
 getBlock ()
 
- Public Member Functions inherited from Event
 getEventName ()
 
 getHandlers ()
 
- Public Member Functions inherited from Cancellable
 isCancelled ()
 
 setCancelled ($forceCancel=false)
 

Static Public Attributes

static $handlerList = null
 

Protected Attributes

 $player
 
 $item
 
 $blockReplace
 
 $blockAgainst
 
- Protected Attributes inherited from BlockEvent
 $block
 
- Protected Attributes inherited from Event
 $eventName = null
 

Detailed Description

Called when a player places a block

Constructor & Destructor Documentation

◆ __construct()

__construct ( Player  $player,
Block  $blockPlace,
Block  $blockReplace,
Block  $blockAgainst,
Item  $item 
)

BlockPlaceEvent constructor.

Parameters
Player$player
Block$blockPlace
Block$blockReplace
Block$blockAgainst
Item$item
54  {
55  $this->block = $blockPlace;
56  $this->blockReplace = $blockReplace;
57  $this->blockAgainst = $blockAgainst;
58  $this->item = $item;
59  $this->player = $player;
60  }

Member Function Documentation

◆ getBlockAgainst()

getBlockAgainst ( )
Returns
Block
88  {
89  return $this->blockAgainst;
90  }

◆ getBlockReplaced()

getBlockReplaced ( )
Returns
Block
81  {
82  return $this->blockReplace;
83  }

◆ getItem()

getItem ( )

Gets the item in hand

Returns
mixed
74  {
75  return $this->item;
76  }

◆ getPlayer()

getPlayer ( )
Returns
Player
65  {
66  return $this->player;
67  }

Field Documentation

◆ $blockAgainst

$blockAgainst
protected

◆ $blockReplace

$blockReplace
protected

◆ $handlerList

$handlerList = null
static

◆ $item

$item
protected

◆ $player

$player
protected

The documentation for this class was generated from the following file: