mirror of
https://github.com/songoda/EpicBosses.git
synced 2024-12-22 07:57:35 +01:00
Apply 1.1.8 changes
This commit is contained in:
parent
f1f4fd9c49
commit
cce5ccfdf3
3
TODO
3
TODO
@ -6,6 +6,3 @@
|
||||
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
|
||||
|
||||
-----------
|
||||
8:45 hrs
|
@ -7,6 +7,7 @@ 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;
|
||||
@ -90,6 +91,9 @@ 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) {
|
||||
|
@ -14,10 +14,12 @@ public class BossDeathEvent extends Event {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Getter private ActiveBossHolder activeBossHolder;
|
||||
@Getter private final ActiveBossHolder activeBossHolder;
|
||||
@Getter private final boolean autoSpawn;
|
||||
|
||||
public BossDeathEvent(ActiveBossHolder activeBossHolder) {
|
||||
public BossDeathEvent(ActiveBossHolder activeBossHolder, boolean autoSpawn) {
|
||||
this.activeBossHolder = activeBossHolder;
|
||||
this.autoSpawn = autoSpawn;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -14,10 +14,12 @@ public class BossSpawnEvent extends Event {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Getter private ActiveBossHolder activeBossHolder;
|
||||
@Getter private final ActiveBossHolder activeBossHolder;
|
||||
@Getter private final boolean autoSpawn;
|
||||
|
||||
public BossSpawnEvent(ActiveBossHolder activeBossHolder) {
|
||||
public BossSpawnEvent(ActiveBossHolder activeBossHolder, boolean autoSpawn) {
|
||||
this.activeBossHolder = activeBossHolder;
|
||||
this.autoSpawn = autoSpawn;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -140,10 +140,12 @@ 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);
|
||||
BossDeathEvent bossDeathEvent = new BossDeathEvent(activeBossHolder, autoSpawn);
|
||||
DropTable dropTable = this.bossEntityManager.getDropTable(bossEntity);
|
||||
|
||||
if(dropTable == null) {
|
||||
|
@ -141,7 +141,7 @@ public class BossSpawnListener implements Listener {
|
||||
activeBossHolder.getTargetHandler().runTargetCycle();
|
||||
this.bossTauntManager.handleTauntSystem(activeBossHolder);
|
||||
|
||||
BossSpawnEvent bossSpawnEvent = new BossSpawnEvent(activeBossHolder);
|
||||
BossSpawnEvent bossSpawnEvent = new BossSpawnEvent(activeBossHolder, false);
|
||||
|
||||
ServerUtils.get().callEvent(bossSpawnEvent);
|
||||
}
|
||||
|
2
pom.xml
2
pom.xml
@ -19,7 +19,7 @@
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<plugin.version>1.0.8-U1</plugin.version>
|
||||
<plugin.version>maven-version-number</plugin.version>
|
||||
<plugin.name>EpicBosses</plugin.name>
|
||||
<plugin.main>com.songoda.epicbosses.CustomBosses</plugin.main>
|
||||
<plugin.author>AMinecraftDev</plugin.author>
|
||||
|
Loading…
Reference in New Issue
Block a user