mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-01 23:47:50 +00:00
feat: use system property for configurable data folder path
Updated `getDataFolder` to allow customization via the `terra.datafolder` system property. This ensures greater flexibility for specifying the data folder location, while maintaining the default path if the property is not set.
This commit is contained in:
parent
7b29d25847
commit
3a7d1a69d0
@ -77,7 +77,9 @@ public final class MinestomPlatform extends AbstractPlatform {
|
||||
|
||||
@Override
|
||||
public @NotNull File getDataFolder() {
|
||||
File file = new File("./terra/");
|
||||
String pathName = System.getProperty("terra.datafolder");
|
||||
if (pathName == null) pathName = "./terra/";
|
||||
File file = new File(pathName);
|
||||
if(!file.exists()) file.mkdirs();
|
||||
return file;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user