Merge branch 'development'

This commit is contained in:
Brianna 2019-12-10 19:27:13 -05:00
commit a245a2637b
3 changed files with 9 additions and 7 deletions

View File

@ -4,7 +4,7 @@ stages:
variables: variables:
name: "EpicBosses" name: "EpicBosses"
path: "/builds/$CI_PROJECT_PATH" path: "/builds/$CI_PROJECT_PATH"
version: "1.2.3" version: "1.2.4"
build: build:
stage: build stage: build

View File

@ -58,11 +58,11 @@ public class BossLocationManager implements IReloadable {
} }
} }
if (WorldGuardHook.isEnabled()) {
if (WorldGuardHook.getBooleanFlag(location, "boss-blocked-region")) { Boolean flag;
ServerUtils.get().logDebug("Unable to spawn boss due to worldguard region having the 'boss-blocked-region' flag"); if ((flag = WorldGuardHook.getBooleanFlag(location, "boss-blocked-region")) != null && flag) {
return false; ServerUtils.get().logDebug("Unable to spawn boss due to worldguard region having the 'boss-blocked-region' flag");
} return false;
} }
if (this.bossHookManager.isFactionsEnabled() && this.bossHookManager.getFactionHelper() != null) { if (this.bossHookManager.isFactionsEnabled() && this.bossHookManager.getFactionHelper() != null) {

View File

@ -20,7 +20,9 @@ public class HealthMechanic implements IBossMechanic {
public boolean applyMechanic(BossEntity bossEntity, ActiveBossHolder activeBossHolder) { public boolean applyMechanic(BossEntity bossEntity, ActiveBossHolder activeBossHolder) {
if (activeBossHolder.getLivingEntityMap().getOrDefault(1, null) == null) return false; if (activeBossHolder.getLivingEntityMap().getOrDefault(1, null) == null) return false;
double maxHealthSetting = (double) SpigotYmlReader.get().getObject("settings.attribute.maxHealth.max"); Object o = SpigotYmlReader.get().getObject("settings.attribute.maxHealth.max");
double maxHealthSetting = o instanceof Double ? (double) o : (double) (int) o;
for (EntityStatsElement entityStatsElement : bossEntity.getEntityStats()) { for (EntityStatsElement entityStatsElement : bossEntity.getEntityStats()) {
MainStatsElement mainStatsElement = entityStatsElement.getMainStats(); MainStatsElement mainStatsElement = entityStatsElement.getMainStats();