mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 12:42:05 -07:00
move commands out of configuration
This commit is contained in:
@@ -1192,16 +1192,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ return Files.exists(legacyConfig) && Files.isRegularFile(legacyConfig);
|
||||
+ }
|
||||
+
|
||||
+ private static final Map<String, Command> COMMANDS = new HashMap<>();
|
||||
+ static {
|
||||
+ }
|
||||
+
|
||||
+ public static void registerCommands(final MinecraftServer server) {
|
||||
+ COMMANDS.forEach((s, command) -> {
|
||||
+ server.server.getCommandMap().register(s, "Paper", command);
|
||||
+ });
|
||||
+ }
|
||||
+
|
||||
+ @Deprecated
|
||||
+ public YamlConfiguration createLegacyObject(final MinecraftServer server) {
|
||||
+ YamlConfiguration global = YamlConfiguration.loadConfiguration(this.globalFolder.resolve(this.globalConfigFileName).toFile());
|
||||
@@ -4016,7 +4006,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // Paper start
|
||||
+ paperConfigurations.initializeGlobalConfiguration();
|
||||
+ paperConfigurations.initializeWorldDefaultsConfiguration();
|
||||
+ io.papermc.paper.configuration.PaperConfigurations.registerCommands(this);
|
||||
+ // Paper end
|
||||
|
||||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||
|
Reference in New Issue
Block a user