From 92dcf6648ea6f0849a30b7daf58a651d90a3fd2c Mon Sep 17 00:00:00 2001 From: replaceitem <40722305+replaceitem@users.noreply.github.com> Date: Fri, 27 Nov 2020 04:54:09 +0100 Subject: [PATCH 1/2] Fixed small mistakes in team functions (#580) --- docs/scarpet/api/Scoreboard.md | 2 +- src/main/java/carpet/script/api/Scoreboards.java | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/scarpet/api/Scoreboard.md b/docs/scarpet/api/Scoreboard.md index 0be72203..98e9c9b7 100644 --- a/docs/scarpet/api/Scoreboard.md +++ b/docs/scarpet/api/Scoreboard.md @@ -69,7 +69,7 @@ Reads the `property` of the `team` if no `value` is specified. If a `value` is a * `color` * Type: String - * Options: See [team command](https://minecraft.gamepedia.com/Commands/team#Arguments) (same strings as `'teamcolor'` [command argument](https://github.com/gnembon/fabric-carpet/blob/master/docs/scarpet/Full.md#command-argument-types] options)) + * Options: See [team command](https://minecraft.gamepedia.com/Commands/team#Arguments) (same strings as `'teamcolor'` [command argument](https://github.com/gnembon/fabric-carpet/blob/master/docs/scarpet/Full.md#command-argument-types) options) * `displayName` * Type: String or FormattedText, when querying returns FormattedText diff --git a/src/main/java/carpet/script/api/Scoreboards.java b/src/main/java/carpet/script/api/Scoreboards.java index 821294ce..0ba8d9e5 100644 --- a/src/main/java/carpet/script/api/Scoreboards.java +++ b/src/main/java/carpet/script/api/Scoreboards.java @@ -262,7 +262,7 @@ public class Scoreboards { if(!(propertyVal instanceof StringValue)) throw new InternalExpressionException("'team_property' requires a string as the second argument"); switch (propertyVal.getString()) { - case "collision_rule": + case "collisionRule": if(!modifying) { Value ret = new StringValue(team.getCollisionRule().name); return (_c, _t) -> ret; @@ -287,7 +287,7 @@ public class Scoreboards { team.setColor(color); break; - case "death_message_visibility": + case "deathMessageVisibility": if(!modifying) { Value ret = new StringValue(team.getDeathMessageVisibilityRule().name); return (_c, _t) -> ret; @@ -300,7 +300,7 @@ public class Scoreboards { team.setDeathMessageVisibilityRule(deathMessageVisibility); break; - case "display_name": + case "displayName": if(!modifying) { Value ret = new FormattedTextValue(team.getDisplayName()); return (_c, _t) -> ret; @@ -319,7 +319,7 @@ public class Scoreboards { team.setDisplayName(displayName); break; - case "friendly_fire": + case "friendlyFire": if(!modifying) { Value ret = new NumericValue(team.isFriendlyFireAllowed()); return (_c, _t) -> ret; @@ -330,7 +330,7 @@ public class Scoreboards { boolean friendlyFire = settingVal.getBoolean(); team.setFriendlyFireAllowed(friendlyFire); break; - case "nametag_visibility": + case "nametagVisibility": if(!modifying) { Value ret = new StringValue(team.getNameTagVisibilityRule().name); return (_c, _t) -> ret; @@ -361,7 +361,7 @@ public class Scoreboards { team.setPrefix(prefix); break; - case "see_friendly_invisibles": + case "seeFriendlyInvisibles": if(!modifying) { Value ret = new NumericValue(team.shouldShowFriendlyInvisibles()); return (_c, _t) -> ret; From db99ed26d8c56c9b4dd317cd5692117ad1df98ad Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 27 Nov 2020 03:54:26 +0000 Subject: [PATCH 2/2] Merge docs for 'Fixed small mistakes in team functions (#580)' --- docs/scarpet/Full.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/scarpet/Full.md b/docs/scarpet/Full.md index 20369350..3dd89bf4 100644 --- a/docs/scarpet/Full.md +++ b/docs/scarpet/Full.md @@ -4217,7 +4217,7 @@ Reads the `property` of the `team` if no `value` is specified. If a `value` is a * `color` * Type: String - * Options: See [team command](https://minecraft.gamepedia.com/Commands/team#Arguments) (same strings as `'teamcolor'` [command argument](https://github.com/gnembon/fabric-carpet/blob/master/docs/scarpet/Full.md#command-argument-types] options)) + * Options: See [team command](https://minecraft.gamepedia.com/Commands/team#Arguments) (same strings as `'teamcolor'` [command argument](https://github.com/gnembon/fabric-carpet/blob/master/docs/scarpet/Full.md#command-argument-types) options) * `displayName` * Type: String or FormattedText, when querying returns FormattedText