Skip to content

Commit c2600ed

Browse files
authored
Merge pull request #55 from whimc/1.20.4-update
1.20.4 update
2 parents 5294e1c + 11ebca6 commit c2600ed

File tree

3 files changed

+12
-27
lines changed

3 files changed

+12
-27
lines changed

pom.xml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,11 @@
1818
<id>spigot-repo</id>
1919
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
2020
</repository>
21-
<!-- Maven repo for Quests -->
21+
<!-- Maven repo for Quests and HolographicDisplays -->
2222
<repository>
2323
<id>codemc-repo</id>
2424
<url>https://repo.codemc.io/repository/maven-public/</url>
2525
</repository>
26-
<!-- Maven repo for DecentHolograms (to replace HolographicDisplays) -->
27-
<repository>
28-
<id>jitpack</id>
29-
<url>https://jitpack.io/</url>
30-
</repository>
3126
<!-- Maven repo for ProtocolLib -->
3227
<repository>
3328
<id>dmulloy2-repo</id>
@@ -48,12 +43,11 @@
4843
<artifactId>spigot-api</artifactId>
4944
<version>1.18.2-R0.1-SNAPSHOT</version>
5045
</dependency>
51-
<!-- Add Decent Holograms to the build -->
46+
<!-- Legacy version of Holographic Displays -->
5247
<dependency>
53-
<groupId>com.github.decentsoftware-eu</groupId>
54-
<artifactId>decentholograms</artifactId>
55-
<version>2.8.6</version>
56-
<scope>provided</scope>
48+
<groupId>com.gmail.filoghost.holographicdisplays</groupId>
49+
<artifactId>holographicdisplays-api</artifactId>
50+
<version>2.4.0</version>
5751
</dependency>
5852
<!-- Add Quests to the build -->
5953
<dependency>

src/main/java/edu/whimc/observations/models/Observation.java

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
11
package edu.whimc.observations.models;
22

3-
/* original HD displays imports
43
import com.gmail.filoghost.holographicdisplays.api.Hologram;
54
import com.gmail.filoghost.holographicdisplays.api.HologramsAPI;
65
import com.gmail.filoghost.holographicdisplays.api.handler.TouchHandler;
76
import com.gmail.filoghost.holographicdisplays.api.line.TouchableLine;
8-
*/
9-
import eu.decentsoftware.holograms.api.DHAPI;
10-
import eu.decentsoftware.holograms.api.holograms.Hologram;
11-
import eu.decentsoftware.holograms.api.holograms.HologramLine;
12-
import eu.decentsoftware.holograms.api.DecentHologramsAPI;
13-
import eu.decentsoftware.holograms.event.DecentHologramsEvent;
14-
import eu.decentsoftware.holograms.event.HologramClickEvent;
15-
import eu.decentsoftware.holograms.api.utils.Common;
167
import edu.whimc.observations.Observations;
178
import edu.whimc.observations.observetemplate.models.ObservationTemplate;
189
import edu.whimc.observations.utils.Utils;
@@ -165,13 +156,13 @@ public static List<String> getPlayersTabComplete(String hint) {
165156
}
166157

167158
private void createHologram() {
168-
Hologram holo = DHAPI.createHologram(this.plugin, this.holoLoc);
159+
Hologram holo = HologramsAPI.createHologram(this.plugin, this.holoLoc);
169160

170161
List<TouchableLine> lines = new ArrayList<>();
171162

172-
DHAPI.addHologramLine(lines, new ItemStack(this.hologramItem));
173-
DHAPI.addHologramLine(lines, Utils.color(this.observation));
174-
DHAPI.addHologramLine(lines, ChatColor.GRAY + this.playerName + " - " + Utils.getDate(this.timestamp));
163+
lines.add(holo.appendItemLine(new ItemStack(this.hologramItem)));
164+
lines.add(holo.appendTextLine(Utils.color(this.observation)));
165+
lines.add(holo.appendTextLine(ChatColor.GRAY + this.playerName + " - " + Utils.getDate(this.timestamp)));
175166

176167
if (this.expiration != null) {
177168
lines.add(holo.appendTextLine(ChatColor.GRAY + "Expires " + Utils.getDate(this.expiration)));
@@ -274,7 +265,7 @@ public void deleteHologramOnly() {
274265
}
275266
}
276267

277-
private class ObservationClick implements DecentHologramsEvent {
268+
private class ObservationClick implements TouchHandler {
278269

279270
private final Location loc;
280271

@@ -288,4 +279,4 @@ public void onTouch(Player player) {
288279
}
289280
}
290281

291-
}
282+
}

src/main/java/edu/whimc/observations/models/QuestObservationObjective.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void onObserve(ObserveEvent event) {
3030
Quests quests = (Quests) plugin;
3131

3232
for (Quest quest : quests.getQuester(event.getPlayer().getUniqueId()).getCurrentQuests().keySet()) {
33-
incrementObjective(event.getPlayer(), this, 1, quest);
33+
incrementObjective(event.getPlayer().getUniqueId(), this, quest, 1);
3434
}
3535
}
3636

0 commit comments

Comments
 (0)