[FIX] Copy-paste в SetProfileResponse

This commit is contained in:
Gravit 2019-02-03 21:13:37 +07:00
parent 8d979b3175
commit d3343518f1
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -10,6 +10,7 @@
import java.util.Collection; import java.util.Collection;
public class SetProfileResponse implements JsonResponseInterface { public class SetProfileResponse implements JsonResponseInterface {
public String client;
@Override @Override
public String getType() { public String getType() {
return "setProfile"; return "setProfile";
@ -24,7 +25,7 @@ public void execute(WebSocketService service, ChannelHandlerContext ctx, Client
} }
Collection<ClientProfile> profiles = LaunchServer.server.getProfiles(); Collection<ClientProfile> profiles = LaunchServer.server.getProfiles();
for (ClientProfile p : profiles) { for (ClientProfile p : profiles) {
if (p.getTitle().equals(client)) { if (p.getTitle().equals(this.client)) {
if (!p.isWhitelistContains(client.username)) { if (!p.isWhitelistContains(client.username)) {
service.sendObject(ctx, new WebSocketService.ErrorResult(LaunchServer.server.config.whitelistRejectString)); service.sendObject(ctx, new WebSocketService.ErrorResult(LaunchServer.server.config.whitelistRejectString));
return; return;