Allow to edit GameProfile properties.

This commit is contained in:
Leymooo
2018-09-11 19:00:34 +03:00
parent f9a98ae41c
commit d2b4b77134
2 changed files with 30 additions and 1 deletions

View File

@@ -54,7 +54,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
private final MinecraftConnection connection;
private final InetSocketAddress virtualHost;
private final GameProfile profile;
private GameProfile profile;
private PermissionFunction permissionFunction = null;
private int tryIndex = 0;
private long ping = -1;
@@ -162,6 +162,17 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
public ConnectionRequestBuilder createConnectionRequest(@NonNull ServerInfo info) {
return new ConnectionRequestBuilderImpl(info);
}
@Override
public List<GameProfile.Property> getGameProfileProperties() {
return this.profile.getProperties();
}
@Override
public void setGameProfileProperties(List<GameProfile.Property> properties) {
Preconditions.checkNotNull(properties);
this.profile = new GameProfile(profile.getId(), profile.getName(), properties);
}
@Override
public void setHeaderAndFooter(@NonNull Component header, @NonNull Component footer) {