Provide a platform independent method of retrieving the datafolder (#769)

* Provide a platform independent method of retrieving the datafolder

* LocaleUtils now uses datafolder

* Make use of Path instead of File

Changes:
* Rename getDataFolder() to getConfigFile() and update to return a Path in each bootstrap

* Rename filePath to tmpFilePath

* Update Velocity configFile to configFile Path
This commit is contained in:
bundabrg 2020-06-21 01:54:40 +08:00 committed by GitHub
parent 100d7b7759
commit e66f57f9f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 56 additions and 12 deletions

View file

@ -37,6 +37,8 @@ import org.geysermc.platform.standalone.command.GeyserCommandManager;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.UUID;
public class GeyserStandaloneBootstrap implements GeyserBootstrap {
@ -100,4 +102,10 @@ public class GeyserStandaloneBootstrap implements GeyserBootstrap {
public IGeyserPingPassthrough getGeyserPingPassthrough() {
return geyserPingPassthrough;
}
@Override
public Path getConfigFolder() {
// Return the current working directory
return Paths.get(System.getProperty("user.dir"));
}
}