本文整理汇总了Java中org.bukkit.event.hanging.HangingEvent类的典型用法代码示例。如果您正苦于以下问题:Java HangingEvent类的具体用法?Java HangingEvent怎么用?Java HangingEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HangingEvent类属于org.bukkit.event.hanging包,在下文中一共展示了HangingEvent类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: on
import org.bukkit.event.hanging.HangingEvent; //导入依赖的package包/类
public void on(Object e) {
if (!(e instanceof Event))
return;
Event event = (Event) e;
onEvent(event);
if (event instanceof PlayerEvent) {
onPlayerEvent((PlayerEvent)event);
}
else if (event instanceof BlockEvent) {
onBlockEvent((BlockEvent)event);
}
else if (event instanceof HangingEvent) {
onHangingEvent((HangingEvent)event);
}
else if (event instanceof InventoryEvent) {
onInventoryEvent((InventoryEvent) event);
}
else if (event instanceof VehicleEvent) {
onVehicleEvent((VehicleEvent) event);
}
else if (event instanceof EntityEvent) {
onEntityEvent((EntityEvent) event);
}
}
示例2: get
import org.bukkit.event.hanging.HangingEvent; //导入依赖的package包/类
@Override
protected Entity[] get(Event event) {
return new Entity[]{((HangingEvent) event).getEntity()};
}
示例3: onHangingEvent
import org.bukkit.event.hanging.HangingEvent; //导入依赖的package包/类
@EventHandler(priority = EventPriority.MONITOR)
public void onHangingEvent(HangingEvent evt) {
checkLocation(evt.getEntity().getLocation(), evt);
}
示例4: onHangingEvent
import org.bukkit.event.hanging.HangingEvent; //导入依赖的package包/类
@Override
protected void onHangingEvent(HangingEvent event) {
}
示例5: onHangingEvent
import org.bukkit.event.hanging.HangingEvent; //导入依赖的package包/类
/**
* Invoked whenever a registered hanging event is called.
*
* <p>Intended for optional override.</p>
*
* @param event The called event.
*/
protected void onHangingEvent(HangingEvent event) {}