mirror of
https://github.com/songoda/EpicBosses.git
synced 2024-09-27 13:03:01 +02:00
Merge branch 'development'
This commit is contained in:
commit
d1203a1933
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>EpicBosses</artifactId>
|
<artifactId>EpicBosses</artifactId>
|
||||||
<groupId>com.songoda.epicbosses</groupId>
|
<groupId>com.songoda.epicbosses</groupId>
|
||||||
<version>1.2.11</version>
|
<version>1.2.12</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>EpicBosses</artifactId>
|
<artifactId>EpicBosses</artifactId>
|
||||||
<groupId>com.songoda.epicbosses</groupId>
|
<groupId>com.songoda.epicbosses</groupId>
|
||||||
<version>1.2.11</version>
|
<version>1.2.12</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>EpicBosses</artifactId>
|
<artifactId>EpicBosses</artifactId>
|
||||||
<groupId>com.songoda.epicbosses</groupId>
|
<groupId>com.songoda.epicbosses</groupId>
|
||||||
<version>1.2.11</version>
|
<version>1.2.12</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>EpicBosses</artifactId>
|
<artifactId>EpicBosses</artifactId>
|
||||||
<groupId>com.songoda.epicbosses</groupId>
|
<groupId>com.songoda.epicbosses</groupId>
|
||||||
<version>1.2.11</version>
|
<version>1.2.12</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>EpicBosses</artifactId>
|
<artifactId>EpicBosses</artifactId>
|
||||||
<groupId>com.songoda.epicbosses</groupId>
|
<groupId>com.songoda.epicbosses</groupId>
|
||||||
<version>1.2.11</version>
|
<version>1.2.12</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -60,7 +60,6 @@ public class EpicBosses extends SongodaPlugin implements IReloadable {
|
|||||||
private BossHookManager bossHookManager;
|
private BossHookManager bossHookManager;
|
||||||
|
|
||||||
private AutoSpawnManager autoSpawnManager;
|
private AutoSpawnManager autoSpawnManager;
|
||||||
private PlaceholderManager placeholderManager;
|
|
||||||
|
|
||||||
private MinionMechanicManager minionMechanicManager;
|
private MinionMechanicManager minionMechanicManager;
|
||||||
private MinionEntityContainer minionEntityContainer;
|
private MinionEntityContainer minionEntityContainer;
|
||||||
@ -135,10 +134,8 @@ public class EpicBosses extends SongodaPlugin implements IReloadable {
|
|||||||
|
|
||||||
this.autoSpawnManager = new AutoSpawnManager(this);
|
this.autoSpawnManager = new AutoSpawnManager(this);
|
||||||
|
|
||||||
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
|
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI"))
|
||||||
this.placeholderManager = new PlaceholderManager(this);
|
new PlaceholderManager(this).register();
|
||||||
this.placeholderManager.register();
|
|
||||||
}
|
|
||||||
|
|
||||||
createFiles();
|
createFiles();
|
||||||
reloadFiles();
|
reloadFiles();
|
||||||
@ -198,6 +195,11 @@ public class EpicBosses extends SongodaPlugin implements IReloadable {
|
|||||||
|
|
||||||
this.autoSpawnManager.startIntervalSystems();
|
this.autoSpawnManager.startIntervalSystems();
|
||||||
|
|
||||||
|
if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
|
||||||
|
System.out.println("hiiiit");
|
||||||
|
new PlaceholderManager(this).register();
|
||||||
|
}
|
||||||
|
|
||||||
ServerUtils.get().logDebug("Loaded all fields and managers, saved messages and plugin is initialized and ready to go. (took " + (System.currentTimeMillis() - beginMs) + "ms).");
|
ServerUtils.get().logDebug("Loaded all fields and managers, saved messages and plugin is initialized and ready to go. (took " + (System.currentTimeMillis() - beginMs) + "ms).");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,10 +351,6 @@ public class EpicBosses extends SongodaPlugin implements IReloadable {
|
|||||||
return this.autoSpawnManager;
|
return this.autoSpawnManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlaceholderManager getPlaceholderManager() {
|
|
||||||
return this.placeholderManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MinionMechanicManager getMinionMechanicManager() {
|
public MinionMechanicManager getMinionMechanicManager() {
|
||||||
return this.minionMechanicManager;
|
return this.minionMechanicManager;
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,8 @@ public class ActiveMinionHolder implements IActiveHolder {
|
|||||||
// this.livingEntityMap.clear();
|
// this.livingEntityMap.clear();
|
||||||
|
|
||||||
// grab list of all valid entities by UUID that can be removed
|
// grab list of all valid entities by UUID that can be removed
|
||||||
Map<Integer, Entity> toRemove = this.livingEntityMap.entrySet().stream().filter(Objects::nonNull)
|
Map<Integer, Entity> toRemove = this.livingEntityMap.entrySet().stream()
|
||||||
|
.filter(e -> e != null && e.getValue() != null && ServerUtils.get().getEntity(e.getValue()) != null)
|
||||||
.collect(Collectors.toMap(Map.Entry::getKey, e -> ServerUtils.get().getEntity(e.getValue())))
|
.collect(Collectors.toMap(Map.Entry::getKey, e -> ServerUtils.get().getEntity(e.getValue())))
|
||||||
.entrySet().stream()
|
.entrySet().stream()
|
||||||
.filter(e -> e.getValue() != null && e.getValue().getWorld().isChunkLoaded(
|
.filter(e -> e.getValue() != null && e.getValue().getWorld().isChunkLoaded(
|
||||||
|
@ -101,7 +101,7 @@ public class BossSkillListener implements Listener {
|
|||||||
|
|
||||||
String customMessage = skill.getCustomMessage();
|
String customMessage = skill.getCustomMessage();
|
||||||
if (customMessage != null)
|
if (customMessage != null)
|
||||||
masterMessage = Arrays.asList(skill.getCustomMessage());
|
masterMessage = BossAPI.getStoredMessages(skill.getCustomMessage());
|
||||||
|
|
||||||
List<LivingEntity> targettedEntities = this.bossSkillManager.getTargetedEntities(activeBossHolder, skill, activeBossHolder.getLivingEntity().getLocation(), damagingEntity);
|
List<LivingEntity> targettedEntities = this.bossSkillManager.getTargetedEntities(activeBossHolder, skill, activeBossHolder.getLivingEntity().getLocation(), damagingEntity);
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.OfflinePlayer;
|
|||||||
|
|
||||||
public class PlaceholderManager extends PlaceholderExpansion {
|
public class PlaceholderManager extends PlaceholderExpansion {
|
||||||
|
|
||||||
private AutoSpawnManager autoSpawnManager;
|
private final AutoSpawnManager autoSpawnManager;
|
||||||
|
|
||||||
public PlaceholderManager(EpicBosses plugin) {
|
public PlaceholderManager(EpicBosses plugin) {
|
||||||
this.autoSpawnManager = plugin.getAutoSpawnManager();
|
this.autoSpawnManager = plugin.getAutoSpawnManager();
|
||||||
@ -24,10 +24,14 @@ public class PlaceholderManager extends PlaceholderExpansion {
|
|||||||
ActiveIntervalAutoSpawnHolder intervalAutoSpawnHolder = (ActiveIntervalAutoSpawnHolder) autoSpawnHolder;
|
ActiveIntervalAutoSpawnHolder intervalAutoSpawnHolder = (ActiveIntervalAutoSpawnHolder) autoSpawnHolder;
|
||||||
long duration = (long) (intervalAutoSpawnHolder.getRemainingMs() / 1000D);
|
long duration = (long) (intervalAutoSpawnHolder.getRemainingMs() / 1000D);
|
||||||
|
|
||||||
String formattedIdentifier = intervalAutoSpawnHolder.getIntervalSpawnElement().getPlaceholder() + "_formatted";
|
String placeHolder = intervalAutoSpawnHolder.getIntervalSpawnElement().getPlaceholder()
|
||||||
|
.replace("{", "")
|
||||||
|
.replace("}", "");
|
||||||
|
|
||||||
|
String formattedIdentifier = placeHolder + "_formatted";
|
||||||
if (identifier.equalsIgnoreCase(formattedIdentifier)) {
|
if (identifier.equalsIgnoreCase(formattedIdentifier)) {
|
||||||
return this.getTimeFormatted(duration);
|
return this.getTimeFormatted(duration);
|
||||||
} else if (identifier.equals(intervalAutoSpawnHolder.getIntervalSpawnElement().getPlaceholder())) {
|
} else if (identifier.equals(placeHolder)) {
|
||||||
return String.valueOf((int) (intervalAutoSpawnHolder.getRemainingMs() / 1000D));
|
return String.valueOf((int) (intervalAutoSpawnHolder.getRemainingMs() / 1000D));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>EpicBosses</artifactId>
|
<artifactId>EpicBosses</artifactId>
|
||||||
<groupId>com.songoda.epicbosses</groupId>
|
<groupId>com.songoda.epicbosses</groupId>
|
||||||
<version>1.2.11</version>
|
<version>1.2.12</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
4
pom.xml
4
pom.xml
@ -4,7 +4,7 @@
|
|||||||
<groupId>com.songoda.epicbosses</groupId>
|
<groupId>com.songoda.epicbosses</groupId>
|
||||||
<artifactId>EpicBosses</artifactId>
|
<artifactId>EpicBosses</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>1.2.11</version>
|
<version>1.2.12</version>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>api-modules/FactionsM</module>
|
<module>api-modules/FactionsM</module>
|
||||||
@ -16,7 +16,7 @@
|
|||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<plugin.version>1.2.11</plugin.version>
|
<plugin.version>1.2.12</plugin.version>
|
||||||
<plugin.name>EpicBosses</plugin.name>
|
<plugin.name>EpicBosses</plugin.name>
|
||||||
<plugin.main>com.songoda.epicbosses.EpicBosses</plugin.main>
|
<plugin.main>com.songoda.epicbosses.EpicBosses</plugin.main>
|
||||||
<plugin.author>Songoda</plugin.author>
|
<plugin.author>Songoda</plugin.author>
|
||||||
|
Loading…
Reference in New Issue
Block a user