diff --git a/main/src/main/java/net/citizensnpcs/trait/ScoreboardTrait.java b/main/src/main/java/net/citizensnpcs/trait/ScoreboardTrait.java index 6b71981cd..b8bda8710 100644 --- a/main/src/main/java/net/citizensnpcs/trait/ScoreboardTrait.java +++ b/main/src/main/java/net/citizensnpcs/trait/ScoreboardTrait.java @@ -69,6 +69,18 @@ public class ScoreboardTrait extends Trait { SUPPORT_TEAM_SETOPTION = false; } } + + if (SUPPORT_COLLIDABLE_SETOPTION && npc.data().has(NPC.COLLIDABLE_METADATA)) { + try { + team.setOption(Option.COLLISION_RULE, + (boolean) npc.data().get(NPC.COLLIDABLE_METADATA) ? OptionStatus.ALWAYS : OptionStatus.NEVER); + } catch (NoSuchMethodError e) { + SUPPORT_COLLIDABLE_SETOPTION = false; + } catch (NoClassDefFoundError e) { + SUPPORT_COLLIDABLE_SETOPTION = false; + } + } + if (!SUPPORT_TEAM_SETOPTION) { NMS.setTeamNameTagVisible(team, nameVisibility); } @@ -129,6 +141,7 @@ public class ScoreboardTrait extends Trait { this.color = color; } + private static boolean SUPPORT_COLLIDABLE_SETOPTION = true; private static boolean SUPPORT_GLOWING_COLOR = true; private static boolean SUPPORT_TAGS = true; private static boolean SUPPORT_TEAM_SETOPTION = true; diff --git a/main/src/main/java/net/citizensnpcs/trait/SkinTrait.java b/main/src/main/java/net/citizensnpcs/trait/SkinTrait.java index 1c2f17147..537de4259 100644 --- a/main/src/main/java/net/citizensnpcs/trait/SkinTrait.java +++ b/main/src/main/java/net/citizensnpcs/trait/SkinTrait.java @@ -127,8 +127,6 @@ public class SkinTrait extends Trait { if (timer-- > 0) return; timer = Setting.PLACEHOLDER_SKIN_UPDATE_FREQUENCY.asInt(); - if (filledPlaceholder == null) - return; checkPlaceholder(true); }