mirror of
https://github.com/Xiao-MoMi/Custom-Nameplates.git
synced 2025-12-19 15:09:23 +00:00
fix bold
This commit is contained in:
@@ -7,7 +7,7 @@ plugins {
|
||||
|
||||
allprojects {
|
||||
|
||||
version = "2.3.3.3"
|
||||
version = "2.3.3.4"
|
||||
|
||||
apply<JavaPlugin>()
|
||||
apply(plugin = "java")
|
||||
|
||||
@@ -29,6 +29,7 @@ import net.kyori.adventure.text.minimessage.internal.parser.node.ElementNode;
|
||||
import net.kyori.adventure.text.minimessage.internal.parser.node.TagNode;
|
||||
import net.kyori.adventure.text.minimessage.internal.parser.node.ValueNode;
|
||||
import net.kyori.adventure.text.minimessage.tag.Inserting;
|
||||
import net.kyori.adventure.text.minimessage.tag.Tag;
|
||||
import net.momirealms.customnameplates.api.CustomNameplatesPlugin;
|
||||
import net.momirealms.customnameplates.api.manager.WidthManager;
|
||||
import net.momirealms.customnameplates.api.mechanic.background.BackGround;
|
||||
@@ -907,7 +908,6 @@ public class WidthManagerImpl implements WidthManager {
|
||||
ElementNode node = (ElementNode) MiniMessage.miniMessage().deserializeToTree(text);
|
||||
ArrayList<Tuple<String, Key, Boolean>> list = new ArrayList<>();
|
||||
nodeToStringInfo(node, list, Key.of("minecraft", "default"), false);
|
||||
|
||||
int totalLength = 0;
|
||||
for (Tuple<String, Key, Boolean> element : list) {
|
||||
FontData data = getFontData(element.getMid());
|
||||
@@ -936,7 +936,11 @@ public class WidthManagerImpl implements WidthManager {
|
||||
} else if (node instanceof TagNode tagNode) {
|
||||
if (tagNode.tag() instanceof Inserting inserting) {
|
||||
Component component = inserting.value();
|
||||
isBold = component.hasDecoration(TextDecoration.BOLD);
|
||||
if (component.decoration(TextDecoration.BOLD) == TextDecoration.State.TRUE) {
|
||||
isBold = true;
|
||||
} else if (component.decoration(TextDecoration.BOLD) == TextDecoration.State.FALSE) {
|
||||
isBold = false;
|
||||
}
|
||||
var key = component.font();
|
||||
if (key != null) {
|
||||
font = net.momirealms.customnameplates.common.Key.of(key.namespace(), key.value());
|
||||
|
||||
@@ -378,7 +378,8 @@ public class RequirementManagerImpl implements RequirementManager {
|
||||
return condition -> {
|
||||
String currentWeather;
|
||||
World world = Objects.requireNonNull(condition.getOfflinePlayer().getPlayer()).getWorld();
|
||||
if (world.isThundering()) currentWeather = "thunder";
|
||||
if (world.hasStorm()) currentWeather = "rainstorm";
|
||||
else if (world.isThundering()) currentWeather = "thunder";
|
||||
else if (world.isClearWeather()) currentWeather = "clear";
|
||||
else currentWeather = "rain";
|
||||
for (String weather : weathers)
|
||||
|
||||
@@ -36,3 +36,13 @@ customcrops:default:
|
||||
뀃: 6
|
||||
뀄: 6
|
||||
뀅: 4
|
||||
|
||||
minecraft:customcrops:
|
||||
default: 8
|
||||
template-loading-sequence: []
|
||||
values:
|
||||
뀁: -2
|
||||
뀂: 4
|
||||
뀃: 6
|
||||
뀄: 6
|
||||
뀅: 4
|
||||
Reference in New Issue
Block a user