Permalink
Browse files

Move fireworks to their own flag ("firework-damage").

  • Loading branch information...
wizjany committed Jan 8, 2017
1 parent 22ef224 commit fb90b1446f19c52fbb11ee3d303d4e49d3b441e0
@@ -124,7 +124,7 @@ public void onEntityDamage(EntityDamageEvent event) {
if (event instanceof EntityDamageByEntityEvent) {
Entity damager = (((EntityDamageByEntityEvent) event)).getDamager();
if (damager != null && damager.getType() == EntityType.FIREWORK) {
if (!query.testState(entity.getLocation(), (RegionAssociable) null, DefaultFlag.OTHER_EXPLOSION)) {
if (!query.testState(entity.getLocation(), (RegionAssociable) null, DefaultFlag.FIREWORK_DAMAGE)) {
event.setCancelled(true);
return;
}
@@ -73,6 +73,7 @@
public static final StateFlag CREEPER_EXPLOSION = new StateFlag("creeper-explosion", true);
public static final StateFlag ENDERDRAGON_BLOCK_DAMAGE = new StateFlag("enderdragon-block-damage", true);
public static final StateFlag GHAST_FIREBALL = new StateFlag("ghast-fireball", true);
public static final StateFlag FIREWORK_DAMAGE = new StateFlag("firework-damage", true);
public static final StateFlag OTHER_EXPLOSION = new StateFlag("other-explosion", true);
public static final StateFlag FIRE_SPREAD = new StateFlag("fire-spread", true);
public static final StateFlag LAVA_FIRE = new StateFlag("lava-fire", true);
@@ -145,7 +146,7 @@
public static final Flag<?>[] flagsList = new Flag<?>[] {
PASSTHROUGH, BUILD, BLOCK_BREAK, BLOCK_PLACE, PVP, CHEST_ACCESS, PISTONS,
TNT, LIGHTER, RIDE, USE, INTERACT, PLACE_VEHICLE, DESTROY_VEHICLE, DAMAGE_ANIMALS, SLEEP,
MOB_DAMAGE, MOB_SPAWNING, DENY_SPAWN, INVINCIBILITY, EXP_DROPS,
MOB_DAMAGE, MOB_SPAWNING, DENY_SPAWN, INVINCIBILITY, EXP_DROPS, FIREWORK_DAMAGE,
CREEPER_EXPLOSION, OTHER_EXPLOSION, ENDERDRAGON_BLOCK_DAMAGE, GHAST_FIREBALL, ENDER_BUILD,
DENY_MESSAGE, ENTRY_DENY_MESSAGE, EXIT_DENY_MESSAGE, EXIT_OVERRIDE, EXIT_VIA_TELEPORT,
GREET_MESSAGE, FAREWELL_MESSAGE, NOTIFY_ENTER, NOTIFY_LEAVE,

0 comments on commit fb90b14

Please sign in to comment.