Merge branch 'master' into 1.17
This commit is contained in:
commit
b8082ba5b8
4 files changed
+22
-4
No files matched your search
@@ -2,6 +2,7 @@ package carpet.script.api;
|
||||
|
||||
import carpet.mixins.ScoreboardObjective_scarpetMixin;
|
||||
import carpet.mixins.Scoreboard_scarpetMixin;
|
||||
import carpet.mixins.Team_scarpetMixin;
|
||||
import carpet.script.CarpetContext;
|
||||
import carpet.script.Expression;
|
||||
import carpet.script.LazyValue;
|
||||
@@ -337,7 +338,7 @@ public class Scoreboards {
|
||||
team.setCollisionRule(collisionRule);
|
||||
break;
|
||||
case "color":
|
||||
if(!modifying) return new StringValue(team.getColor().getName());
|
||||
if(!modifying) return new StringValue(((Team_scarpetMixin) team).getColor().getName());
|
||||
if(!(settingVal instanceof StringValue)) throw new InternalExpressionException("'team_property' requires a string as the third argument for the property " + propertyVal.getString());
|
||||
Formatting color = Formatting.byName(settingVal.getString().toUpperCase());
|
||||
if(color == null || !color.isColor()) throw new InternalExpressionException("Unknown value for property " + propertyVal.getString() + ": " + settingVal.getString());
|
||||
|
||||
Reference in new issue
Block a user