Merge branch 'development'

This commit is contained in:
Christian Koop 2022-01-15 23:09:36 +01:00
commit 443aef2151
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3
2 changed files with 13 additions and 8 deletions

View File

@ -6,8 +6,7 @@
<groupId>com.songoda</groupId>
<artifactId>EpicAnchors</artifactId>
<version>2.0.0-ALPHA</version>
<!-- Run 'mvn versions:set -DgenerateBackupPoms=false -DnewVersion=X.Y.Z-DEV' to update version recursively -->
<version>2.2.0</version>
<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.5.8</version>
<version>2.6.10</version>
<scope>compile</scope>
</dependency>
@ -158,7 +157,7 @@
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>21.0.1</version>
<version>23.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>

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());
}
}