use of lotr.common.world.biome.LOTRBiome in project pvp-mode by VulcanForge.
the class MiddleEarthBiomeOverrideCondition method isPvPEnabled.
@Override
public Boolean isPvPEnabled(EntityPlayer player) {
Boolean pvpEnabled = null;
BiomeGenBase currentBiome = player.worldObj.getWorldChunkManager().getBiomeGenAt((int) player.posX, (int) player.posZ);
// Check if we are in a relevant LOTR biome
if (currentBiome instanceof LOTRBiome && configurationData.containsKey(currentBiome.biomeID)) {
for (BiomeFactionEntry entry : configurationData.get(currentBiome.biomeID)) {
Boolean enabled = handleCondition(entry, player);
if (enabled != null) {
pvpEnabled = enabled;
}
}
}
return pvpEnabled;
}
Aggregations