Code Enhancements...
This commit is contained in:
@@ -40,9 +40,7 @@ public class MapFLocToStringSetTypeAdapter implements JsonDeserializer<Map<FLoca
|
||||
|
||||
nameSet = new HashSet<>();
|
||||
iter = entry2.getValue().getAsJsonArray().iterator();
|
||||
while (iter.hasNext()) {
|
||||
nameSet.add(iter.next().getAsString());
|
||||
}
|
||||
while (iter.hasNext()) nameSet.add(iter.next().getAsString());
|
||||
|
||||
locationMap.put(new FLocation(worldName, x, z), nameSet);
|
||||
}
|
||||
|
||||
@@ -16,11 +16,7 @@ public class VisualizeUtil {
|
||||
}
|
||||
|
||||
public static Set<Location> getPlayerLocations(UUID uuid) {
|
||||
Set<Location> ret = playerLocations.get(uuid);
|
||||
if (ret == null) {
|
||||
ret = new HashSet<>();
|
||||
playerLocations.put(uuid, ret);
|
||||
}
|
||||
Set<Location> ret = playerLocations.computeIfAbsent(uuid, k -> new HashSet<>());
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user