Skip to content

Commit ab3a1a0

Browse files
committed
Rename new functions for clarity
1 parent c4aa4d6 commit ab3a1a0

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/main/java/com/laytonsmith/core/functions/EntityManagement.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5677,25 +5677,25 @@ public Version since() {
56775677

56785678
@api
56795679
@seealso({PlayerManagement.pshow_entity.class, PlayerManagement.phide_entity.class,
5680-
PlayerManagement.pcan_see_entity.class, set_entity_visible_by_default.class})
5681-
public static class is_entity_visible_by_default extends EntityGetterFunction {
5680+
PlayerManagement.pcan_see_entity.class, set_entity_hidden_by_default.class})
5681+
public static class is_entity_hidden_by_default extends EntityGetterFunction {
56825682

56835683
@Override
56845684
public String getName() {
5685-
return "is_entity_visible_by_default";
5685+
return "is_entity_hidden_by_default";
56865686
}
56875687

56885688
@Override
56895689
public String docs() {
5690-
return "boolean {entityUUID} Returns an entity's default visibility to a client. (MC 1.19.3+)"
5691-
+ " Unrelated to the invisibility potion effect. If false,"
5692-
+ " pshow_entity() must be used before a player's client can see this entity.";
5690+
return "boolean {entityUUID} Returns whether an entity is hidden by default to clients. (MC 1.19.3+)"
5691+
+ " If true, pshow_entity() must be used before a player's client can see this entity."
5692+
+ " Unrelated to the invisibility potion effect.";
56935693
}
56945694

56955695
@Override
56965696
public Mixed exec(Target t, Environment env, Mixed... args) throws ConfigRuntimeException {
56975697
MCEntity entity = Static.getEntity(args[0], t);
5698-
return CBoolean.get(entity.isVisibleByDefault());
5698+
return CBoolean.get(!entity.isVisibleByDefault());
56995699
}
57005700

57015701
@Override
@@ -5706,25 +5706,25 @@ public Version since() {
57065706

57075707
@api
57085708
@seealso({PlayerManagement.pshow_entity.class, PlayerManagement.phide_entity.class,
5709-
PlayerManagement.pcan_see_entity.class, is_entity_visible_by_default.class})
5710-
public static class set_entity_visible_by_default extends EntitySetterFunction {
5709+
PlayerManagement.pcan_see_entity.class, is_entity_hidden_by_default.class})
5710+
public static class set_entity_hidden_by_default extends EntitySetterFunction {
57115711

57125712
@Override
57135713
public String getName() {
5714-
return "set_entity_visible_by_default";
5714+
return "set_entity_hidden_by_default";
57155715
}
57165716

57175717
@Override
57185718
public String docs() {
5719-
return "void {entityUUID, visibility} Sets an entity's default visibility to a client. (MC 1.19.3+)"
5720-
+ " Unrelated to the invisibility potion effect. If visibility is false,"
5721-
+ " pshow_entity() must be used before a player's client can see this entity.";
5719+
return "void {entityUUID, hidden} Sets whether an entity's is hidden by default to clients. (MC 1.19.3+)"
5720+
+ " If set to true, pshow_entity() must be used before a player's client can see this entity."
5721+
+ " Unrelated to the invisibility potion effect.";
57225722
}
57235723

57245724
@Override
57255725
public Mixed exec(Target t, Environment env, Mixed... args) throws ConfigRuntimeException {
57265726
MCEntity entity = Static.getEntity(args[0], t);
5727-
entity.setVisibleByDefault(ArgumentValidation.getBooleanObject(args[1], t));
5727+
entity.setVisibleByDefault(!ArgumentValidation.getBooleanObject(args[1], t));
57285728
return CVoid.VOID;
57295729
}
57305730

0 commit comments

Comments
 (0)