forked from GeyserMC/Geyser
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:
parent
100d7b7759
commit
e66f57f9f0
7 changed files with 56 additions and 12 deletions
|
@ -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"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue