mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-24 03:25:24 +01:00
Check for both LARGE_FIREBALL and FIREBALL for the EntityType in the entity listener.
This is to counteract a breaking Bukkit change.
This commit is contained in:
parent
08ce207636
commit
6d09b18479
@ -89,6 +89,7 @@
|
||||
public class WorldGuardEntityListener implements Listener {
|
||||
|
||||
private WorldGuardPlugin plugin;
|
||||
private EntityType fireballEntityType;
|
||||
|
||||
/**
|
||||
* Construct the object;
|
||||
@ -97,6 +98,12 @@ public class WorldGuardEntityListener implements Listener {
|
||||
*/
|
||||
public WorldGuardEntityListener(WorldGuardPlugin plugin) {
|
||||
this.plugin = plugin;
|
||||
|
||||
try {
|
||||
fireballEntityType = EntityType.valueOf("LARGE_FIREBALL");
|
||||
} catch (IllegalArgumentException e) {
|
||||
fireballEntityType = EntityType.valueOf("FIREBALL");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -637,7 +644,7 @@ else if (event.getEntityType() == EntityType.WITHER_SKULL) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (event.getEntityType() == EntityType.LARGE_FIREBALL) {
|
||||
else if (event.getEntityType() == fireballEntityType) {
|
||||
if (wcfg.blockFireballExplosions) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user