mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-12 11:21:34 +01:00
Fixed the wrong cache directory being used.
This commit is contained in:
parent
6dbd731c92
commit
80aec378d8
@ -75,7 +75,7 @@ public void setup() {
|
|||||||
cacheDir.mkdirs();
|
cacheDir.mkdirs();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
profileCache = new SQLiteCache(new File(getPlatform().getConfigDir().toFile(), "profiles.sqlite"));
|
profileCache = new SQLiteCache(new File(cacheDir, "profiles.sqlite"));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
WorldGuard.logger.log(Level.WARNING, "Failed to initialize SQLite profile cache");
|
WorldGuard.logger.log(Level.WARNING, "Failed to initialize SQLite profile cache");
|
||||||
profileCache = new HashMapCache();
|
profileCache = new HashMapCache();
|
||||||
|
@ -267,10 +267,9 @@ public String toPlayersString() {
|
|||||||
return toPlayersString(null);
|
return toPlayersString(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public String toPlayersString(@Nullable ProfileCache cache) {
|
public String toPlayersString(@Nullable ProfileCache cache) {
|
||||||
StringBuilder str = new StringBuilder();
|
StringBuilder str = new StringBuilder();
|
||||||
List<String> output = new ArrayList<String>();
|
List<String> output = new ArrayList<>();
|
||||||
|
|
||||||
for (String name : playerDomain.getPlayers()) {
|
for (String name : playerDomain.getPlayers()) {
|
||||||
output.add("name:" + name);
|
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();) {
|
for (Iterator<String> it = output.iterator(); it.hasNext();) {
|
||||||
str.append(it.next());
|
str.append(it.next());
|
||||||
if (it.hasNext()) {
|
if (it.hasNext()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user