mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-23 17:47:35 +01:00
Set collidable scoreboard option and always test for placeholders in skin names
This commit is contained in:
parent
8f341ccaf2
commit
6b30d06705
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user