remove super redundant code
i always thought i have to do it
This commit is contained in:
parent
dc5a62540b
commit
972214e496
2 changed files with 0 additions and 3 deletions
|
@ -205,8 +205,6 @@ public class PlayersPlugin extends Bot.Listener {
|
||||||
|
|
||||||
final JsonObject player = playersObject.get(getName(target)).getAsJsonObject();
|
final JsonObject player = playersObject.get(getName(target)).getAsJsonObject();
|
||||||
|
|
||||||
if (player.has("lastSeen")) player.remove("lastSeen");
|
|
||||||
|
|
||||||
final JsonObject object = new JsonObject();
|
final JsonObject object = new JsonObject();
|
||||||
object.addProperty("time", Instant.now().toEpochMilli());
|
object.addProperty("time", Instant.now().toEpochMilli());
|
||||||
object.addProperty("server", bot.host + ":" + bot.port);
|
object.addProperty("server", bot.host + ":" + bot.port);
|
||||||
|
|
|
@ -41,7 +41,6 @@ public class PersistentDataUtilities {
|
||||||
final String property = entry.getKey();
|
final String property = entry.getKey();
|
||||||
final JsonElement value = entry.getValue();
|
final JsonElement value = entry.getValue();
|
||||||
|
|
||||||
if (jsonObject.has(property)) jsonObject.remove(property);
|
|
||||||
jsonObject.add(property, value);
|
jsonObject.add(property, value);
|
||||||
|
|
||||||
write(jsonObject.toString());
|
write(jsonObject.toString());
|
||||||
|
|
Loading…
Reference in a new issue