move commands out of configuration
This commit is contained in:
parent
c0a157eb9f
commit
4d7c2c787c
14 changed files with 78 additions and 99 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue