remove super redundant code
i always thought i have to do it
This commit is contained in:
@@ -205,8 +205,6 @@ public class PlayersPlugin extends Bot.Listener {
|
||||
|
||||
final JsonObject player = playersObject.get(getName(target)).getAsJsonObject();
|
||||
|
||||
if (player.has("lastSeen")) player.remove("lastSeen");
|
||||
|
||||
final JsonObject object = new JsonObject();
|
||||
object.addProperty("time", Instant.now().toEpochMilli());
|
||||
object.addProperty("server", bot.host + ":" + bot.port);
|
||||
|
||||
@@ -41,7 +41,6 @@ public class PersistentDataUtilities {
|
||||
final String property = entry.getKey();
|
||||
final JsonElement value = entry.getValue();
|
||||
|
||||
if (jsonObject.has(property)) jsonObject.remove(property);
|
||||
jsonObject.add(property, value);
|
||||
|
||||
write(jsonObject.toString());
|
||||
|
||||
Reference in New Issue
Block a user