mirror of
https://github.com/songoda/EpicAnchors.git
synced 2024-11-22 18:15:53 +01:00
Merge branch 'development'
This commit is contained in:
commit
443aef2151
7
pom.xml
7
pom.xml
@ -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>
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user