Fix UUID caching when using a non-standard world path

This commit is contained in:
Byteflux 2015-05-08 14:37:29 -07:00
parent c5b8064525
commit c761a80bf9

View File

@ -114,7 +114,7 @@ public class UUIDHandler {
UUIDHandler.CACHED = true;
if (Settings.TWIN_MODE_UUID) {
HashSet<UUID> all = getAllUUIDS();
final File playerdataFolder = new File(world + File.separator + "playerdata");
final File playerdataFolder = new File(Bukkit.getWorldContainer(), world + File.separator + "playerdata");
String[] dat = playerdataFolder.list(new FilenameFilter() {
@Override
public boolean accept(final File f, final String s) {
@ -146,7 +146,7 @@ public class UUIDHandler {
final HashSet<String> names = new HashSet<>();
for (final String worldname : worlds) {
// Getting UUIDs
final File playerdataFolder = new File(worldname + File.separator + "playerdata");
final File playerdataFolder = new File(Bukkit.getWorldContainer(), worldname + File.separator + "playerdata");
String[] dat = playerdataFolder.list(new FilenameFilter() {
@Override
public boolean accept(final File f, final String s) {