mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-21 11:45:19 +01:00
Do not rely on a static file path
Doing so will cause issues with the `--plugins` flag. E.g. `java -jar server.jar --plugins /path/to/plugins/`
This commit is contained in:
parent
cc48f273c0
commit
7775cd0073
@ -175,7 +175,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
||||
|
||||
static {
|
||||
try {
|
||||
Settings.load(new File("plugins/PlotSquared/config/settings.yml"));
|
||||
Settings.load(new File(PlotSquared.platform().getDirectory(), "settings.yml"));
|
||||
} catch (Throwable ignored) {
|
||||
}
|
||||
}
|
||||
|
@ -1365,7 +1365,7 @@ public class PlotSquared {
|
||||
public boolean setupConfigs() {
|
||||
File folder = new File(this.platform.getDirectory(), "config");
|
||||
if (!folder.exists() && !folder.mkdirs()) {
|
||||
logger.error("Failed to create the /plugins/PlotSquared/config folder. Please create it manually");
|
||||
logger.error("Failed to create the {} config folder. Please create it manually", this.platform.getDirectory());
|
||||
}
|
||||
try {
|
||||
this.worldsFile = new File(folder, "worlds.yml");
|
||||
|
Loading…
Reference in New Issue
Block a user