mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 10:56:42 +00:00
Temporary solution to fix Golems being butchered. This includes Iron and snow golems.
This commit is contained in:
@ -475,6 +475,7 @@ public class BukkitWorld extends LocalWorld {
|
||||
boolean killNPCs = (flags & KillFlags.NPCS) != 0;
|
||||
boolean killAnimals = (flags & KillFlags.ANIMALS) != 0;
|
||||
boolean withLightning = (flags & KillFlags.WITH_LIGHTNING) != 0;
|
||||
boolean killGolems = (flags & KillFlags.GOLEMS) != 0;
|
||||
|
||||
int num = 0;
|
||||
double radiusSq = radius * radius;
|
||||
@ -494,6 +495,13 @@ public class BukkitWorld extends LocalWorld {
|
||||
continue; // tamed wolf
|
||||
}
|
||||
|
||||
try {
|
||||
// Temporary solution to fix Golems being butchered.
|
||||
if (!killGolems && Class.forName("org.bukkit.entity.Golem").isAssignableFrom(ent.getClass())) {
|
||||
continue;
|
||||
}
|
||||
} catch (ClassNotFoundException e) {}
|
||||
|
||||
try {
|
||||
// Temporary solution until org.bukkit.entity.NPC is widely deployed.
|
||||
if (!killNPCs && Class.forName("org.bukkit.entity.NPC").isAssignableFrom(ent.getClass())) {
|
||||
|
Reference in New Issue
Block a user