mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-07 08:58:27 +01:00
replace hardcoded file separator (#2121)
This commit is contained in:
parent
f52150ec1d
commit
e991f09921
@ -15,7 +15,7 @@ import com.google.common.io.Files;
|
||||
*/
|
||||
public abstract class Pladdon extends JavaPlugin {
|
||||
|
||||
private static final String ADDONS_FOLDER = "BentoBox/addons";
|
||||
private static final String ADDONS_FOLDER = "BentoBox" + File.separator + "addons";
|
||||
|
||||
/**
|
||||
* This must return a new instance of the addon. It is called when the Pladdon is loaded.
|
||||
@ -33,7 +33,7 @@ public abstract class Pladdon extends JavaPlugin {
|
||||
}
|
||||
|
||||
protected void moveJar() {
|
||||
getLogger().severe(getFile().getName() + " must be in the BentoBox/addons folder! Trying to move it there...");
|
||||
getLogger().severe(getFile().getName() + " must be in the " + ADDONS_FOLDER + " folder! Trying to move it there...");
|
||||
File addons = new File(getFile().getParent(), ADDONS_FOLDER);
|
||||
if (addons.exists() || addons.mkdirs()) {
|
||||
File to = new File(addons, getFile().getName());
|
||||
@ -44,7 +44,7 @@ public abstract class Pladdon extends JavaPlugin {
|
||||
|
||||
} catch (IOException ex) {
|
||||
getLogger().severe("Failed to move it. " + ex.getMessage());
|
||||
getLogger().severe("Move " + getFile().getName() + " manually into the BentoBox/addons folder. Then restart server.");
|
||||
getLogger().severe("Move " + getFile().getName() + " manually into the " + ADDONS_FOLDER + " folder. Then restart server.");
|
||||
}
|
||||
} else {
|
||||
getLogger().warning(getFile().getName() + " already is in the addons folder. Delete the one in the plugins folder.");
|
||||
|
Loading…
Reference in New Issue
Block a user