Permalink
Browse files

Fixed the wrong cache directory being used.

  • Loading branch information...
me4502 committed Dec 10, 2018
1 parent 6dbd731 commit 80aec378d8c26773c1bc02890c79634d1c9f2288
@@ -75,7 +75,7 @@ public void setup() {
cacheDir.mkdirs();

try {
profileCache = new SQLiteCache(new File(getPlatform().getConfigDir().toFile(), "profiles.sqlite"));
profileCache = new SQLiteCache(new File(cacheDir, "profiles.sqlite"));
} catch (IOException e) {
WorldGuard.logger.log(Level.WARNING, "Failed to initialize SQLite profile cache");
profileCache = new HashMapCache();
@@ -267,10 +267,9 @@ public String toPlayersString() {
return toPlayersString(null);
}

@SuppressWarnings("deprecation")
public String toPlayersString(@Nullable ProfileCache cache) {
StringBuilder str = new StringBuilder();
List<String> output = new ArrayList<String>();
List<String> output = new ArrayList<>();

for (String name : playerDomain.getPlayers()) {
output.add("name:" + name);
@@ -292,7 +291,7 @@ public String toPlayersString(@Nullable ProfileCache cache) {
}
}

Collections.sort(output, String.CASE_INSENSITIVE_ORDER);
output.sort(String.CASE_INSENSITIVE_ORDER);
for (Iterator<String> it = output.iterator(); it.hasNext();) {
str.append(it.next());
if (it.hasNext()) {

0 comments on commit 80aec37

Please sign in to comment.