mirror of
https://github.com/ColdeZhang/Dominion.git
synced 2024-12-24 14:09:03 +08:00
新增“末影龙破坏方块”领地设置
This commit is contained in:
parent
c859718f8b
commit
cc2423dd1b
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>cn.lunadeer</groupId>
|
||||
<artifactId>Dominion</artifactId>
|
||||
<version>1.35.10-beta</version>
|
||||
<version>1.36.0-beta</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Dominion</name>
|
||||
|
@ -25,9 +25,10 @@ public enum Flag {
|
||||
CAKE("cake", "吃蛋糕", "是否可以吃蛋糕", false, false, true),
|
||||
CONTAINER("container", "一般容器", "包含:箱子/木桶/潜影盒/盔甲架/展示框", false, false, true),
|
||||
CRAFT("craft", "使用工作台", "是否可以使用工作台", false, false, true),
|
||||
CREEPER_EXPLODE("creeper_explode", "实体爆炸", "包含:苦力怕/凋零头颅/水晶爆炸", false, true, true),
|
||||
CREEPER_EXPLODE("creeper_explode", "实体爆炸", "包含:苦力怕/凋零头颅/末影水晶/火球", false, true, true),
|
||||
COMPARER("comparer", "比较器交互", "是否可以修改比较器状态", false, false, true),
|
||||
DOOR("door", "门交互", "是否可以使用各种材质的门(包括活板门)", false, false, true),
|
||||
DRAGON_BREAK_BLOCK("dragon_break_block", "末影龙破坏方块", "末影龙冲撞是否可以破坏方块", false, true, true),
|
||||
DRAGON_EGG("dragon_egg", "触碰龙蛋", "是否可以触碰龙蛋", false, false, true),
|
||||
DYE("dye", "染色", "是否可以使用染料(对羊、狗项圈、猫项圈)染色", false, false, true),
|
||||
EDIT_SIGN("edit_sign", "编辑告示牌", "是否可以编辑告示牌", false, false, true),
|
||||
|
@ -38,6 +38,16 @@ public class EnvironmentEvents implements Listener {
|
||||
checkFlag(dom, Flag.CREEPER_EXPLODE, event);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST) // dragon_break_block
|
||||
public void onDragonBreakBlock(EntityExplodeEvent event) {
|
||||
Entity entity = event.getEntity();
|
||||
if (entity.getType() != EntityType.ENDER_DRAGON) {
|
||||
return;
|
||||
}
|
||||
DominionDTO dom = Cache.instance.getDominion(event.getLocation());
|
||||
checkFlag(dom, Flag.DRAGON_BREAK_BLOCK, event);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST) // fire_spread
|
||||
public void onFireSpread(BlockIgniteEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
|
Loading…
Reference in New Issue
Block a user