evelon
evelon copied to clipboard
Custom Config Pfad
Ich will für mein Velocity Plugin einen Custom Config Pfad angebene aber es klappt nicht
@Inject
public Playtime(ProxyServer proxy, Logger logger, @DataDirectory Path dataDirectory) {
this.proxy = proxy;
this.logger = logger;
this.dataDirectory = dataDirectory;
mySQLManager = new MySQLManager();
instance = this;
logger.info("Playtime Plugin has Started");
TimeManager.start();
ConnectionAuthenticationPath.set("plugins/playtime/evelon-connection-credentials.json");
}
Hey, hast du auch überprüft, ob der Ordner existiert? \
Dazu würde ich dir empfehlen: Path.of("/plugins/....").toString() zuverwenden.
Probiere es mal hiermit:
var path = Path.of("plugins/playtime");
path.toFile().mkdirs();
ConnectionAuthenticationPath.set(path.resolve("evelon-connection-credentials").toString());