public class BlockCanBuildEvent extends BlockEvent
Note: ブロックを配置しようとした時に呼び出されます。主にブロックが配置可能であるかを確認する為に使用されます。
getMaterial() もしくは getMaterialId() を使用してください.
 Event.Result| Modifier and Type | Field and Description | 
|---|---|
| protected boolean | buildable | 
| protected int | materialDeprecated. 
 Magic value | 
block| Constructor and Description | 
|---|
| BlockCanBuildEvent(Block block,
                  int id,
                  boolean canBuild)Deprecated. 
 Magic value | 
| Modifier and Type | Method and Description | 
|---|---|
| static HandlerList | getHandlerList() | 
| HandlerList | getHandlers() | 
| Material | getMaterial()配置しようとしているMaterialクラスを取得します。 | 
| int | getMaterialId()推奨されていません。 
 マジックナンバー | 
| boolean | isBuildable()ブロックが配置出来るかを判定します。 | 
| void | setBuildable(boolean cancel)ブロックが配置出来るかを設定します。 | 
getBlockgetEventName, isAsynchronousprotected boolean buildable
@Deprecated protected int material
@Deprecated public BlockCanBuildEvent(Block block, int id, boolean canBuild)
block - このイベントに関するブロックid - 配置するブロックのIDcanBuild - 配置出来るかについての判定public boolean isBuildable()
デフォルトでの配置判定はMinecraftサーバーが返します。
public void setBuildable(boolean cancel)
cancel - trueを設定すると判定に関わらず配置出来るようになります。public Material getMaterial()
@Deprecated public int getMaterialId()
public HandlerList getHandlers()
getHandlers in class Eventpublic static HandlerList getHandlerList()
Copyright © 2015. All rights reserved.