mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-01 08:20:51 +01:00
1e7dd72f15
The game uses 0.95d now
24 lines
1.7 KiB
Diff
24 lines
1.7 KiB
Diff
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
|
|
index e85439c7124655f0f078ae395bad250fa1d3c88e..940f79b4456e94fd15b3e6eec38e8fa59ab01d14 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -352,7 +352,11 @@ public final class CraftServer implements Server {
|
|
}
|
|
this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile());
|
|
this.commandsConfiguration.options().copyDefaults(true);
|
|
- this.commandsConfiguration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(this.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(this.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
|