2023-06-16 13:02:43 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: TheMeinerLP <p.glanz@madfix.me>
|
|
|
|
Date: Tue, 13 Jun 2023 16:10:59 +0200
|
|
|
|
Subject: [PATCH] Don't enforce icanhasbukkit default if alias block exists
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
2023-09-22 22:13:57 +02:00
|
|
|
index ef4c259504694d27534834a5d33e78a8d33ece6c..9b0877f67d5845030b3f11240e89e77401a01c3e 100644
|
2023-06-16 13:02:43 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
2023-09-22 18:11:35 +02:00
|
|
|
@@ -360,7 +360,11 @@ public final class CraftServer implements Server {
|
2023-06-16 13:02:43 +02:00
|
|
|
}
|
|
|
|
this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile());
|
|
|
|
this.commandsConfiguration.options().copyDefaults(true);
|
|
|
|
- this.commandsConfiguration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(getClass().getClassLoader().getResourceAsStream("configurations/commands.yml"), Charsets.UTF_8)));
|
|
|
|
+ // Paper start - don't enforce icanhasbukkit default if alias block exists
|
|
|
|
+ final YamlConfiguration commandsDefaults = YamlConfiguration.loadConfiguration(new InputStreamReader(getClass().getClassLoader().getResourceAsStream("configurations/commands.yml"), Charsets.UTF_8));
|
|
|
|
+ if (this.commandsConfiguration.contains("aliases")) commandsDefaults.set("aliases", null);
|
|
|
|
+ this.commandsConfiguration.setDefaults(commandsDefaults);
|
|
|
|
+ // Paper stop - dont enforce icanhasbukkit default if alias block exists
|
|
|
|
this.saveCommandsConfig();
|
|
|
|
|
|
|
|
// Migrate aliases from old file and add previously implicit $1- to pass all arguments
|