mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 19:15:32 +01:00
50f2e124a1
We have long been receiving feedback about our warning messages when excessive velocities are set on entities. We have, for the most part, ignored much of this feedback because these warnings can be vital in identifying the cause of a watchdog crash. These crashes would otherwise be more difficult to identify without this information. However, in many cases these warnings are unnecessarily verbose as the server handles these excessive sets itself without user intervention. As a compromise, we will only warn the user as part of a watchdog crash log, and we will only include the most recent occurrence. This commit represents a first effort on this front. It may need to be tweaked later to provide more relevant information, such as the time it occurred, and/or not printing the warning at all if the occurrence was a certain time period ago.
31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
From 90fc7033f2b9fb52ba2b0bb3163ce856804fdeb3 Mon Sep 17 00:00:00 2001
|
|
From: willies952002 <admin@domnian.com>
|
|
Date: Mon, 28 Nov 2016 10:21:52 -0500
|
|
Subject: [PATCH] Allow Reloading of Command Aliases
|
|
|
|
Reload the aliases stored in commands.yml
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index 1bbce7a..31c9a66 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -1848,5 +1848,15 @@ public final class CraftServer implements Server {
|
|
});
|
|
}
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public void reloadCommandAliases() {
|
|
+ Set<String> removals = getCommandAliases().keySet().stream()
|
|
+ .map(key -> key.toLowerCase(java.util.Locale.ENGLISH))
|
|
+ .collect(java.util.stream.Collectors.toSet());
|
|
+ getCommandMap().getKnownCommands().keySet().removeIf(removals::contains);
|
|
+ commandsConfiguration = YamlConfiguration.loadConfiguration(getCommandsConfigFile());
|
|
+ commandMap.registerServerAliases();
|
|
+ }
|
|
// Paper end
|
|
}
|
|
--
|
|
2.9.3
|
|
|