diff --git a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java index 19c81595b..5bfac2d26 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java @@ -46,7 +46,7 @@ import com.velocitypowered.proxy.command.builtin.SendCommand; import com.velocitypowered.proxy.command.builtin.ServerCommand; import com.velocitypowered.proxy.command.builtin.ShutdownCommand; import com.velocitypowered.proxy.command.builtin.VelocityCommand; -import com.velocitypowered.proxy.config.LegacyConfigurationLoader; +import com.velocitypowered.proxy.config.ConfigurationLoader; import com.velocitypowered.proxy.config.VelocityConfiguration; import com.velocitypowered.proxy.connection.client.ConnectedPlayer; import com.velocitypowered.proxy.connection.player.resourcepack.VelocityResourcePackInfo; @@ -403,8 +403,7 @@ public class VelocityServer implements ProxyServer, ForwardingAudience { @SuppressFBWarnings("DM_EXIT") private void doStartupConfigLoad() { try { - Path configPath = Path.of("velocity.toml"); - configuration = LegacyConfigurationLoader.read(configPath); + configuration = ConfigurationLoader.loadConfiguration(); if (!configuration.validate()) { logger.error("Your configuration is invalid. Velocity will not start up until the errors " @@ -415,7 +414,7 @@ public class VelocityServer implements ProxyServer, ForwardingAudience { commandManager.setAnnounceProxyCommands(configuration.isAnnounceProxyCommands()); } catch (Exception e) { - logger.error("Unable to read/load/save your velocity.toml. The server will shut down.", e); + logger.error("Unable to read/load/save your velocity.yml. The server will shut down.", e); LogManager.shutdown(); System.exit(1); } @@ -478,11 +477,10 @@ public class VelocityServer implements ProxyServer, ForwardingAudience { * Reloads the proxy's configuration. * * @return {@code true} if successful, {@code false} if we can't read the configuration - * @throws IOException if we can't read {@code velocity.toml} + * @throws IOException if we can't read {@code velocity.yml} */ public boolean reloadConfiguration() throws IOException { - Path configPath = Path.of("velocity.toml"); - VelocityConfiguration newConfiguration = LegacyConfigurationLoader.read(configPath); + VelocityConfiguration newConfiguration = ConfigurationLoader.loadConfiguration(); if (!newConfiguration.validate()) { return false;