mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-08 11:59:43 +01:00
Move fireworks to their own flag ("firework-damage").
This commit is contained in:
parent
22ef224a81
commit
fb90b1446f
@ -124,7 +124,7 @@ public void onEntityDamage(EntityDamageEvent event) {
|
|||||||
if (event instanceof EntityDamageByEntityEvent) {
|
if (event instanceof EntityDamageByEntityEvent) {
|
||||||
Entity damager = (((EntityDamageByEntityEvent) event)).getDamager();
|
Entity damager = (((EntityDamageByEntityEvent) event)).getDamager();
|
||||||
if (damager != null && damager.getType() == EntityType.FIREWORK) {
|
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);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -73,6 +73,7 @@ public final class DefaultFlag {
|
|||||||
public static final StateFlag CREEPER_EXPLOSION = new StateFlag("creeper-explosion", true);
|
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 ENDERDRAGON_BLOCK_DAMAGE = new StateFlag("enderdragon-block-damage", true);
|
||||||
public static final StateFlag GHAST_FIREBALL = new StateFlag("ghast-fireball", 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 OTHER_EXPLOSION = new StateFlag("other-explosion", true);
|
||||||
public static final StateFlag FIRE_SPREAD = new StateFlag("fire-spread", true);
|
public static final StateFlag FIRE_SPREAD = new StateFlag("fire-spread", true);
|
||||||
public static final StateFlag LAVA_FIRE = new StateFlag("lava-fire", true);
|
public static final StateFlag LAVA_FIRE = new StateFlag("lava-fire", true);
|
||||||
@ -145,7 +146,7 @@ public final class DefaultFlag {
|
|||||||
public static final Flag<?>[] flagsList = new Flag<?>[] {
|
public static final Flag<?>[] flagsList = new Flag<?>[] {
|
||||||
PASSTHROUGH, BUILD, BLOCK_BREAK, BLOCK_PLACE, PVP, CHEST_ACCESS, PISTONS,
|
PASSTHROUGH, BUILD, BLOCK_BREAK, BLOCK_PLACE, PVP, CHEST_ACCESS, PISTONS,
|
||||||
TNT, LIGHTER, RIDE, USE, INTERACT, PLACE_VEHICLE, DESTROY_VEHICLE, DAMAGE_ANIMALS, SLEEP,
|
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,
|
CREEPER_EXPLOSION, OTHER_EXPLOSION, ENDERDRAGON_BLOCK_DAMAGE, GHAST_FIREBALL, ENDER_BUILD,
|
||||||
DENY_MESSAGE, ENTRY_DENY_MESSAGE, EXIT_DENY_MESSAGE, EXIT_OVERRIDE, EXIT_VIA_TELEPORT,
|
DENY_MESSAGE, ENTRY_DENY_MESSAGE, EXIT_DENY_MESSAGE, EXIT_OVERRIDE, EXIT_VIA_TELEPORT,
|
||||||
GREET_MESSAGE, FAREWELL_MESSAGE, NOTIFY_ENTER, NOTIFY_LEAVE,
|
GREET_MESSAGE, FAREWELL_MESSAGE, NOTIFY_ENTER, NOTIFY_LEAVE,
|
||||||
|
Loading…
Reference in New Issue
Block a user