本文整理汇总了Java中org.bukkit.event.entity.EntityBreakDoorEvent类的典型用法代码示例。如果您正苦于以下问题:Java EntityBreakDoorEvent类的具体用法?Java EntityBreakDoorEvent怎么用?Java EntityBreakDoorEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EntityBreakDoorEvent类属于org.bukkit.event.entity包,在下文中一共展示了EntityBreakDoorEvent类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onEntityBreakDoor
import org.bukkit.event.entity.EntityBreakDoorEvent; //导入依赖的package包/类
@EventHandler
public void onEntityBreakDoor(EntityBreakDoorEvent event) {
BlockProtection blockProtection = this.module.getProtectManager().getBlockProtection(event.getBlock().getLocation());
if(blockProtection.exists()) {
event.setCancelled(true);
}
}
开发者ID:Steveice10,项目名称:Peacecraft,代码行数:8,代码来源:ProtectListener.java
示例2: onEntityBreakDoor
import org.bukkit.event.entity.EntityBreakDoorEvent; //导入依赖的package包/类
@EventHandler(priority = EventPriority.HIGH)
public void onEntityBreakDoor(EntityBreakDoorEvent event) {
bcoord.setFromLocation(event.getBlock().getLocation());
StructureBlock sb = CivGlobal.getStructureBlock(bcoord);
if (sb != null) {
event.setCancelled(true);
}
CampBlock cb = CivGlobal.getCampBlock(bcoord);
if (cb != null) {
event.setCancelled(true);
}
}
开发者ID:netizen539,项目名称:civcraft,代码行数:14,代码来源:BlockListener.java
示例3: onEntityChangeBlock
import org.bukkit.event.entity.EntityBreakDoorEvent; //导入依赖的package包/类
@EventHandler(ignoreCancelled = true)
public void onEntityChangeBlock(EntityChangeBlockEvent event) {
AttackType attackType = AttackType.UNKNOWN;
if (event instanceof EntityBreakDoorEvent) {
attackType = AttackType.ZOMBIE;
} else if (event.getEntity() instanceof Enderman) {
attackType = AttackType.ENDERMAN;
}
if (plugin.getChestSettings().allowDestroyBy(attackType)) {
return;
}
if (isProtected(event.getBlock())) {
event.setCancelled(true);
}
}
开发者ID:rutgerkok,项目名称:BlockLocker,代码行数:16,代码来源:BlockDestroyListener.java
示例4: onEntityBreakDoor
import org.bukkit.event.entity.EntityBreakDoorEvent; //导入依赖的package包/类
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onEntityBreakDoor(final EntityBreakDoorEvent event)
{
ActionEntityBlock action = this.newAction(EntityBreak.class, event.getBlock().getWorld());
if (action != null)
{
action.setNewBlock(event.getTo());
this.setAndLog(action, adjustBlockForDoubleBlocks(event.getBlock().getState()), event.getEntity());
}
}
开发者ID:CubeEngine,项目名称:modules-extra,代码行数:11,代码来源:ListenerEntityBlock.java
示例5: onDoorBreak
import org.bukkit.event.entity.EntityBreakDoorEvent; //导入依赖的package包/类
@EventHandler
public void onDoorBreak(EntityBreakDoorEvent event)
{
Location l = event.getBlock().getLocation();
Entity e = event.getEntity();
Map<Location, Integer> b = plugin.getBlessedBlocks();
if (b.containsKey(l)) {
if (e instanceof Zombie) {
event.setCancelled(true);
}
}
}
开发者ID:EmilHernvall,项目名称:tregmine,代码行数:15,代码来源:BlessedBlockListener.java
示例6: onZombieBreakDoor
import org.bukkit.event.entity.EntityBreakDoorEvent; //导入依赖的package包/类
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
public void onZombieBreakDoor(EntityBreakDoorEvent event)
{
if(!GriefPrevention.instance.config_zombiesBreakDoors) event.setCancelled(true);
}
开发者ID:john01dav,项目名称:GriefPreventionPlus,代码行数:6,代码来源:EntityEventHandler.java
示例7: onBreakDoor
import org.bukkit.event.entity.EntityBreakDoorEvent; //导入依赖的package包/类
@EventHandler
public void onBreakDoor(EntityBreakDoorEvent e) {
RedProtect.get().logger.debug("RPEntityListener - Is EntityBreakDoorEvent");
}
开发者ID:FabioZumbi12,项目名称:RedProtect,代码行数:5,代码来源:RPEntityListener.java
注:本文中的org.bukkit.event.entity.EntityBreakDoorEvent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论