本文整理汇总了Java中org.bukkit.event.entity.CreeperPowerEvent类的典型用法代码示例。如果您正苦于以下问题:Java CreeperPowerEvent类的具体用法?Java CreeperPowerEvent怎么用?Java CreeperPowerEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CreeperPowerEvent类属于org.bukkit.event.entity包,在下文中一共展示了CreeperPowerEvent类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreeperPower
import org.bukkit.event.entity.CreeperPowerEvent; //导入依赖的package包/类
@EventHandler(ignoreCancelled = false)
public void onCreeperPower(cn.nukkit.event.entity.CreeperPowerEvent event) {
if (canIgnore(CreeperPowerEvent.getHandlerList())) {
return;
}
PowerCause cause = PowerCause.valueOf(event.getCause().name()); // Dirty and fast conversion
CreeperPowerEvent bukkitEvent = new CreeperPowerEvent((Creeper) PokkitEntity.toBukkit(event.getEntity()), cause);
callCancellable(event, bukkitEvent);
}
示例2: CreeperPowerEvent
import org.bukkit.event.entity.CreeperPowerEvent; //导入依赖的package包/类
public CreeperPowerEvent(Creeper creeper, LightningStrike bolt, CreeperPowerEvent.PowerCause cause) {
}
示例3: getCause
import org.bukkit.event.entity.CreeperPowerEvent; //导入依赖的package包/类
public CreeperPowerEvent.PowerCause getCause() {
return null;
}
示例4: onCreeperCharged
import org.bukkit.event.entity.CreeperPowerEvent; //导入依赖的package包/类
@EventHandler(ignoreCancelled = true)
void onCreeperCharged(CreeperPowerEvent event) {
if (plugin.isShopkeeper(event.getEntity())) {
event.setCancelled(true);
}
}