Fix resolving data directory on Sponge servers with a custom config dir location (#875)

This commit is contained in:
Luck 2018-03-30 21:37:33 +01:00
parent 509e89b9cf
commit 72f9de6cc7
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -236,16 +236,14 @@ public class LPSpongeBootstrap implements LuckPermsBootstrap {
@Override
public String getServerVersion() {
return getGame().getPlatform().getContainer(Platform.Component.API).getName() + ": " +
getGame().getPlatform().getContainer(Platform.Component.API).getVersion().orElse("null") + " - " +
getGame().getPlatform().getContainer(Platform.Component.IMPLEMENTATION).getName() + ": " +
getGame().getPlatform().getContainer(Platform.Component.IMPLEMENTATION).getVersion().orElse("null");
PluginContainer api = getGame().getPlatform().getContainer(Platform.Component.API);
PluginContainer impl = getGame().getPlatform().getContainer(Platform.Component.IMPLEMENTATION);
return api.getName() + ": " + api.getVersion().orElse("null") + " - " + impl.getName() + ": " + impl.getVersion().orElse("null");
}
@Override
public File getDataDirectory() {
Path serverRoot = getConfigPath().getParent().getParent();
Path dataDirectory = serverRoot.resolve("luckperms");
Path dataDirectory = this.game.getGameDirectory().resolve("luckperms");
try {
Files.createDirectories(dataDirectory);
} catch (IOException e) {