Skip to content

Commit

Permalink
Update to latest hermes
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatGravyBoat committed Mar 29, 2024
1 parent b94fe0f commit db19d9f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
import earth.terrarium.heracles.api.quests.Quest;
import earth.terrarium.heracles.api.quests.QuestDisplay;
import earth.terrarium.heracles.client.handlers.ClientQuests;
import earth.terrarium.hermes.api.defaults.ComponentTagElement;
import earth.terrarium.hermes.api.defaults.TextTagElement;
import net.minecraft.network.chat.CommonComponents;

import java.util.Map;

public class SubtitleTagElement extends ComponentTagElement {
public class SubtitleTagElement extends TextTagElement {

public SubtitleTagElement(Map<String, String> parameters) {
super(parameters);
String id = parameters.get("id");
this.text = ClientQuests.get(id)
this.component.append(ClientQuests.get(id)
.map(ClientQuests.QuestEntry::value)
.map(Quest::display)
.map(QuestDisplay::subtitle)
.orElse(CommonComponents.EMPTY);
.orElse(CommonComponents.EMPTY));
}
}

0 comments on commit db19d9f

Please sign in to comment.