Fix the fix that doesn't fix.
This commit is contained in:
parent
32c3801acf
commit
4142875c06
1 changed files with 4 additions and 2 deletions
|
@ -29,10 +29,12 @@ 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 JsonObject object = new JsonObject();
|
final JsonObject object = new JsonObject();
|
||||||
object.addProperty("uuid", target.profile.getIdAsString());
|
object.addProperty("uuid", target.profile.getIdAsString());
|
||||||
if (!object.has("lastSeen")) object.add("lastSeen", new JsonObject());
|
if (originalObject != null && !originalObject.getAsJsonObject().has("lastSeen")) object.add("lastSeen", new JsonObject());
|
||||||
if (!object.has("ips")) object.add("ips", new JsonObject());
|
if (originalObject != null && !originalObject.getAsJsonObject().has("ips")) object.add("ips", new JsonObject());
|
||||||
|
|
||||||
final CompletableFuture<String> future = bot.players.getPlayerIP(target);
|
final CompletableFuture<String> future = bot.players.getPlayerIP(target);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue