Updated Core to v2.6.10

This commit is contained in:
Christian Koop 2022-01-15 23:09:06 +01:00
parent 53e4482980
commit 090a243e96
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3
2 changed files with 11 additions and 6 deletions

View File

@ -7,7 +7,6 @@
<groupId>com.songoda</groupId>
<artifactId>EpicAnchors</artifactId>
<version>2.1.0</version>
<!-- Run 'mvn versions:set -DgenerateBackupPoms=false -DnewVersion=X.Y.Z-DEV' to update version recursively -->
<name>EpicAnchors</name>
<description>Allow your players to keep chunks loaded for a limited amount of time for a cost.</description>
@ -150,7 +149,7 @@
<dependency>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore</artifactId>
<version>2.6.6</version>
<version>2.6.10</version>
<scope>compile</scope>
</dependency>

View File

@ -425,11 +425,17 @@ public class AnchorManager {
// are holograms enabled?
if (!Settings.HOLOGRAMS.getBoolean() || !HologramManager.getManager().isEnabled()) return;
Map<Location, List<String>> hologramData = new HashMap<>(anchors.size());
Map<String, List<String>> hologramData = new HashMap<>(anchors.size());
for (Anchor anchor : anchors) {
hologramData.put(anchor.getLocation(),
Collections.singletonList(formatAnchorText(anchor.getTicksLeft(), true)));
List<String> lines = Collections.singletonList(formatAnchorText(anchor.getTicksLeft(), true));
if (!HologramManager.isHologramLoaded("Anchor#" + anchor.getDbId())) {
HologramManager.createHologram("Anchor#" + anchor.getDbId(), anchor.getLocation(), lines);
continue;
}
hologramData.put("Anchor#" + anchor.getDbId(), lines);
}
// Create the holograms
@ -466,6 +472,6 @@ public class AnchorManager {
}
private static void removeHologram(Anchor anchor) {
HologramManager.removeHologram(anchor.getLocation());
HologramManager.removeHologram("Anchor#" + anchor.getDbId());
}
}