From 02313e8a8f79c61db3db9fb41ddebc1037cb8c57 Mon Sep 17 00:00:00 2001 From: Esophose Date: Sat, 16 Mar 2019 09:28:13 -0600 Subject: [PATCH] Revert 1.1.8, moved changes to Legacy-1.1.8 --- .gitlab-ci.yml | 2 +- TODO | 5 ++++- .../epicbosses/autospawns/types/IntervalSpawnElement.java | 5 ----- .../src/com/songoda/epicbosses/events/BossDeathEvent.java | 6 ++---- .../src/com/songoda/epicbosses/events/BossSpawnEvent.java | 6 ++---- .../epicbosses/listeners/after/BossDeathListener.java | 5 ++--- .../songoda/epicbosses/listeners/pre/BossSpawnListener.java | 2 +- pom.xml | 2 +- 8 files changed, 13 insertions(+), 20 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f3d12a9..2ce4cab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: variables: name: "EpicBosses" path: "/builds/$CI_PROJECT_PATH" - version: "1.1.8-U4" + version: "1.0.0" build: stage: build diff --git a/TODO b/TODO index 3c38673..5f1fc67 100644 --- a/TODO +++ b/TODO @@ -5,4 +5,7 @@ -> AutoSpawns Editing GUI 01:00 -> Wilderness - Button to change max coords, boss that autospawn applies to, maxActiveBosses, spawnChance 01:00 -> Spawner - Button to change max coords, boss that autospawn applies to, maxActiveBosses, spawnChance -01:00 -> Biome - Button to change max bosses per biome, boss that autospawn applies to, spawnChance \ No newline at end of file +01:00 -> Biome - Button to change max bosses per biome, boss that autospawn applies to, spawnChance + +----------- +8:45 hrs \ No newline at end of file diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/autospawns/types/IntervalSpawnElement.java b/plugin-modules/Core/src/com/songoda/epicbosses/autospawns/types/IntervalSpawnElement.java index d70ff24..4c92e46 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/autospawns/types/IntervalSpawnElement.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/autospawns/types/IntervalSpawnElement.java @@ -7,7 +7,6 @@ import com.songoda.epicbosses.autospawns.IAutoSpawnCustomSettingsHandler; import com.songoda.epicbosses.autospawns.handlers.IntervalSpawnHandler; import com.songoda.epicbosses.autospawns.settings.AutoSpawnSettings; import com.songoda.epicbosses.entity.BossEntity; -import com.songoda.epicbosses.events.BossSpawnEvent; import com.songoda.epicbosses.holder.ActiveBossHolder; import com.songoda.epicbosses.holder.autospawn.ActiveIntervalAutoSpawnHolder; import com.songoda.epicbosses.listeners.IBossDeathHandler; @@ -91,10 +90,6 @@ public class IntervalSpawnElement implements IAutoSpawnCustomSettingsHandler { activeBossHolder.getPostBossDeathHandlers().add(bossDeathHandler); activeAutoSpawnHolder.getActiveBossHolders().add(activeBossHolder); - - BossSpawnEvent bossSpawnEvent = new BossSpawnEvent(activeBossHolder, true); - - ServerUtils.get().callEvent(bossSpawnEvent); } if(customSpawnMessage && spawnMessage != null) { diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/events/BossDeathEvent.java b/plugin-modules/Core/src/com/songoda/epicbosses/events/BossDeathEvent.java index 582759d..1b927f3 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/events/BossDeathEvent.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/events/BossDeathEvent.java @@ -14,12 +14,10 @@ public class BossDeathEvent extends Event { private static final HandlerList handlers = new HandlerList(); - @Getter private final ActiveBossHolder activeBossHolder; - @Getter private final boolean autoSpawn; + @Getter private ActiveBossHolder activeBossHolder; - public BossDeathEvent(ActiveBossHolder activeBossHolder, boolean autoSpawn) { + public BossDeathEvent(ActiveBossHolder activeBossHolder) { this.activeBossHolder = activeBossHolder; - this.autoSpawn = autoSpawn; } @Override diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/events/BossSpawnEvent.java b/plugin-modules/Core/src/com/songoda/epicbosses/events/BossSpawnEvent.java index 288a38e..a429acb 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/events/BossSpawnEvent.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/events/BossSpawnEvent.java @@ -14,12 +14,10 @@ public class BossSpawnEvent extends Event { private static final HandlerList handlers = new HandlerList(); - @Getter private final ActiveBossHolder activeBossHolder; - @Getter private final boolean autoSpawn; + @Getter private ActiveBossHolder activeBossHolder; - public BossSpawnEvent(ActiveBossHolder activeBossHolder, boolean autoSpawn) { + public BossSpawnEvent(ActiveBossHolder activeBossHolder) { this.activeBossHolder = activeBossHolder; - this.autoSpawn = autoSpawn; } @Override diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/listeners/after/BossDeathListener.java b/plugin-modules/Core/src/com/songoda/epicbosses/listeners/after/BossDeathListener.java index 8d14959..f2147c8 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/listeners/after/BossDeathListener.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/listeners/after/BossDeathListener.java @@ -7,6 +7,7 @@ import com.songoda.epicbosses.events.BossDeathEvent; import com.songoda.epicbosses.events.PreBossDeathEvent; import com.songoda.epicbosses.holder.ActiveBossHolder; import com.songoda.epicbosses.holder.DeadBossHolder; +import com.songoda.epicbosses.listeners.IBossDeathHandler; import com.songoda.epicbosses.managers.BossEntityManager; import com.songoda.epicbosses.utils.Debug; import com.songoda.epicbosses.utils.MessageUtils; @@ -139,12 +140,10 @@ public class BossDeathListener implements Listener { } }); - boolean autoSpawn = !activeBossHolder.getPostBossDeathHandlers().isEmpty(); - activeBossHolder.getPostBossDeathHandlers().forEach(handler -> handler.onPreDeath(event)); DeadBossHolder deadBossHolder = new DeadBossHolder(bossEntity, location, mapOfDamage, mapOfPercent); - BossDeathEvent bossDeathEvent = new BossDeathEvent(activeBossHolder, autoSpawn); + BossDeathEvent bossDeathEvent = new BossDeathEvent(activeBossHolder); DropTable dropTable = this.bossEntityManager.getDropTable(bossEntity); if(dropTable == null) { diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/listeners/pre/BossSpawnListener.java b/plugin-modules/Core/src/com/songoda/epicbosses/listeners/pre/BossSpawnListener.java index adb4b4f..f224725 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/listeners/pre/BossSpawnListener.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/listeners/pre/BossSpawnListener.java @@ -141,7 +141,7 @@ public class BossSpawnListener implements Listener { activeBossHolder.getTargetHandler().runTargetCycle(); this.bossTauntManager.handleTauntSystem(activeBossHolder); - BossSpawnEvent bossSpawnEvent = new BossSpawnEvent(activeBossHolder, false); + BossSpawnEvent bossSpawnEvent = new BossSpawnEvent(activeBossHolder); ServerUtils.get().callEvent(bossSpawnEvent); } diff --git a/pom.xml b/pom.xml index 16e1dd8..685dec7 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ - 1.1.8-U4 + 1.0.8-U1 EpicBosses com.songoda.epicbosses.CustomBosses AMinecraftDev