File tree Expand file tree Collapse file tree
main/java/org/mvplugins/multiverse/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -623,6 +623,16 @@ public String getBukkitYmlPath() {
623623 return configHandle .get (configNodes .bukkitYmlPath );
624624 }
625625
626+ @ ApiStatus .AvailableSince ("5.3" )
627+ public Try <Void > setServerPropertiesPath (String serverPropertiesPath ) {
628+ return configHandle .set (configNodes .serverPropertiesPath , serverPropertiesPath );
629+ }
630+
631+ @ ApiStatus .AvailableSince ("5.3" )
632+ public String getServerPropertiesPath () {
633+ return configHandle .get (configNodes .serverPropertiesPath );
634+ }
635+
626636 /**
627637 * {@inheritDoc}
628638 */
Original file line number Diff line number Diff line change @@ -512,6 +512,14 @@ private <N extends Node> N node(N node) {
512512 .name ("bukkit-yml-path" )
513513 .build ());
514514
515+ final ConfigNode <String > serverPropertiesPath = node (ConfigNode .builder ("misc.server-properties-path" , String .class )
516+ .comment ("" )
517+ .comment ("Change this if you use a custom path for the server.properties file with `--config` startup flag." )
518+ .comment ("Note: this config option needs a server restart to take effect." )
519+ .defaultValue ("server.properties" )
520+ .name ("server-properties-path" )
521+ .build ());
522+
515523 final ConfigNode <Integer > globalDebug = node (ConfigNode .builder ("misc.global-debug" , Integer .class )
516524 .comment ("" )
517525 .comment ("This is our debug flag to help identify issues with Multiverse." )
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ public File getServerFolder() {
7777 */
7878 public @ Nullable File getServerProperties () {
7979 if (this .serverProperties == null ) {
80- this .serverProperties = findFileFromServerDirectory ("server.properties" );
80+ this .serverProperties = findFileFromServerDirectory (config . getServerPropertiesPath () );
8181 Logging .finer ("server.properties: %s" , this .serverProperties );
8282 }
8383 return this .serverProperties ;
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ event-priority:
5454
5555misc :
5656 bukkit-yml-path : bukkit.yml
57+ server-properties-path : server.properties
5758 global-debug : 0
5859 debug-permissions : false
5960 silent-start : false
You can’t perform that action at this time.
0 commit comments