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
|
@ -50,6 +50,7 @@ import org.spongepowered.api.plugin.Plugin;
|
|||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.nio.file.Path;
|
||||
import java.util.UUID;
|
||||
|
||||
@Plugin(id = "geyser", name = GeyserConnector.NAME + "-Sponge", version = GeyserConnector.VERSION, url = "https://geysermc.org", authors = "GeyserMC")
|
||||
|
@ -147,6 +148,11 @@ public class GeyserSpongePlugin implements GeyserBootstrap {
|
|||
return geyserSpongePingPassthrough;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Path getConfigFolder() {
|
||||
return configDir.toPath();
|
||||
}
|
||||
|
||||
@Listener
|
||||
public void onServerStart(GameStartedServerEvent event) {
|
||||
onEnable();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue