mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-01-08 19:33:58 +01:00
parent
7ea14c1a03
commit
c36b98d778
1 changed files with 4 additions and 4 deletions
|
@ -30,6 +30,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.serverbound.inventory.Ser
|
|||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.geysermc.geyser.session.GeyserSession;
|
||||
import org.geysermc.geyser.text.ChatColor;
|
||||
import org.geysermc.geyser.translator.text.MessageTranslator;
|
||||
import org.geysermc.geyser.level.GeyserAdvancement;
|
||||
import org.geysermc.geyser.text.GeyserLocale;
|
||||
|
@ -140,7 +141,7 @@ public class AdvancementsCache {
|
|||
if (advancement != null) {
|
||||
if (advancement.getParentId() != null && currentAdvancementCategoryId.equals(advancement.getRootId(this))) {
|
||||
boolean color = isEarned(advancement) || !advancement.getDisplayData().isShowToast();
|
||||
builder.button((color ? "§6" : "") + MessageTranslator.convertMessage(advancement.getDisplayData().getTitle()) + '\n');
|
||||
builder.button((color ? ChatColor.DARK_GREEN : "") + MessageTranslator.convertMessage(advancement.getDisplayData().getTitle()) + '\n');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -266,10 +267,9 @@ public class AdvancementsCache {
|
|||
}
|
||||
|
||||
public String getColorFromAdvancementFrameType(GeyserAdvancement advancement) {
|
||||
String base = "\u00a7";
|
||||
if (advancement.getDisplayData().getFrameType() == Advancement.DisplayData.FrameType.CHALLENGE) {
|
||||
return base + "5";
|
||||
return ChatColor.DARK_PURPLE;
|
||||
}
|
||||
return base + "a"; // Used for types TASK and GOAL
|
||||
return ChatColor.GREEN; // Used for types TASK and GOAL
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue