Adding query player language (#824)
This commit is contained in:
1 parent
390c40ae74
commit
164122eba2
7 files changed
+49
-1
No files matched your search
@@ -535,6 +535,12 @@ public class EntityValue extends Value
|
||||
});
|
||||
|
||||
put("air", (e, a) -> new NumericValue(e.getAir()));
|
||||
put("language", (e, a)->{
|
||||
if(!(e instanceof ServerPlayerEntity))
|
||||
return NULL;
|
||||
String lang = ((ServerPlayerEntityInterface) e).getLanguage();
|
||||
return StringValue.of(lang);
|
||||
});
|
||||
put("persistence", (e, a) -> {
|
||||
if (e instanceof MobEntity) return new NumericValue(((MobEntity) e).isPersistent());
|
||||
return Value.NULL;
|
||||
|
||||
Reference in new issue
Block a user