mirror of
https://github.com/YouHaveTrouble/NotJustNameplates.git
synced 2026-05-11 22:16:57 +00:00
potential workaround for placeholders returning minimessage format
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "me.youhavetrouble"
|
||||
version = "1.2.0"
|
||||
version = "1.2.1-pre1"
|
||||
description = "Nameplates using display entities"
|
||||
|
||||
java {
|
||||
|
||||
@@ -35,12 +35,16 @@ public class TextParser {
|
||||
return Tag.selfClosingInserting(player.displayName());
|
||||
}
|
||||
default -> {
|
||||
if (NotJustNameplates.isPapiHooked()) {
|
||||
if (!NotJustNameplates.isPapiHooked()) return Tag.selfClosingInserting(Component.text(placeholder));
|
||||
|
||||
final String parsedPlaceholder = PlaceholderAPI.setPlaceholders(player, '%' + placeholder + '%');
|
||||
|
||||
if (parsedPlaceholder.contains(LegacyComponentSerializer.SECTION_CHAR + "")) {
|
||||
Component componentPlaceholder = LegacyComponentSerializer.legacySection().deserialize(parsedPlaceholder);
|
||||
return Tag.selfClosingInserting(componentPlaceholder);
|
||||
}
|
||||
return Tag.selfClosingInserting(Component.text(placeholder));
|
||||
|
||||
return Tag.selfClosingInserting(MiniMessage.miniMessage().deserialize(parsedPlaceholder));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user