Fix the "Fix the fix that doesn't fix.".
This commit is contained in:
parent
4142875c06
commit
bff3c2f58d
1 changed files with 10 additions and 5 deletions
|
@ -29,12 +29,17 @@ public class PlayersPersistentDataPlugin extends PlayersPlugin.Listener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void playerJoined(PlayerEntry target) {
|
public void playerJoined(PlayerEntry target) {
|
||||||
final JsonElement originalObject = playersObject.get(target.profile.getName());
|
final JsonElement originalElement = playersObject.get(target.profile.getName());
|
||||||
|
|
||||||
final JsonObject object = new JsonObject();
|
JsonObject object;
|
||||||
object.addProperty("uuid", target.profile.getIdAsString());
|
|
||||||
if (originalObject != null && !originalObject.getAsJsonObject().has("lastSeen")) object.add("lastSeen", new JsonObject());
|
if (originalElement == null) {
|
||||||
if (originalObject != null && !originalObject.getAsJsonObject().has("ips")) object.add("ips", new JsonObject());
|
object = new JsonObject();
|
||||||
|
object.addProperty("uuid", target.profile.getIdAsString());
|
||||||
|
object.add("ips", new JsonObject());
|
||||||
|
} else {
|
||||||
|
object = originalElement.getAsJsonObject();
|
||||||
|
}
|
||||||
|
|
||||||
final CompletableFuture<String> future = bot.players.getPlayerIP(target);
|
final CompletableFuture<String> future = bot.players.getPlayerIP(target);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue