mirror of
https://github.com/songoda/EpicAnchors.git
synced 2024-11-26 12:05:43 +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>
|
<groupId>com.songoda</groupId>
|
||||||
<artifactId>EpicAnchors</artifactId>
|
<artifactId>EpicAnchors</artifactId>
|
||||||
<version>2.0.0-ALPHA</version>
|
<version>2.2.0</version>
|
||||||
<!-- Run 'mvn versions:set -DgenerateBackupPoms=false -DnewVersion=X.Y.Z-DEV' to update version recursively -->
|
|
||||||
|
|
||||||
<name>EpicAnchors</name>
|
<name>EpicAnchors</name>
|
||||||
<description>Allow your players to keep chunks loaded for a limited amount of time for a cost.</description>
|
<description>Allow your players to keep chunks loaded for a limited amount of time for a cost.</description>
|
||||||
@ -150,7 +149,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.songoda</groupId>
|
<groupId>com.songoda</groupId>
|
||||||
<artifactId>SongodaCore</artifactId>
|
<artifactId>SongodaCore</artifactId>
|
||||||
<version>2.5.8</version>
|
<version>2.6.10</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@ -158,7 +157,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jetbrains</groupId>
|
<groupId>org.jetbrains</groupId>
|
||||||
<artifactId>annotations</artifactId>
|
<artifactId>annotations</artifactId>
|
||||||
<version>21.0.1</version>
|
<version>23.0.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -425,11 +425,17 @@ public class AnchorManager {
|
|||||||
// are holograms enabled?
|
// are holograms enabled?
|
||||||
if (!Settings.HOLOGRAMS.getBoolean() || !HologramManager.getManager().isEnabled()) return;
|
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) {
|
for (Anchor anchor : anchors) {
|
||||||
hologramData.put(anchor.getLocation(),
|
List<String> lines = Collections.singletonList(formatAnchorText(anchor.getTicksLeft(), true));
|
||||||
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
|
// Create the holograms
|
||||||
@ -466,6 +472,6 @@ public class AnchorManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void removeHologram(Anchor anchor) {
|
private static void removeHologram(Anchor anchor) {
|
||||||
HologramManager.removeHologram(anchor.getLocation());
|
HologramManager.removeHologram("Anchor#" + anchor.getDbId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user