3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-16 21:10:30 +01:00

If a command is defined on the proxy, don't include suggestions from the backend too

Dieser Commit ist enthalten in:
Andrew Steinborn 2020-08-24 14:53:01 -04:00
Ursprung 10a14af2ea
Commit ba7cdac812

Datei anzeigen

@ -175,6 +175,10 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler {
filterNode(server.getCommandManager().getDispatcher().getRoot());
Collection<CommandNode<CommandSource>> proxyNodes = dispatcherRootNode.getChildren();
for (CommandNode<CommandSource> node : proxyNodes) {
CommandNode<CommandSource> existingServerChild = rootNode.getChild(node.getName());
if (existingServerChild != null) {
rootNode.getChildren().remove(existingServerChild);
}
rootNode.addChild(node);
}
}
@ -203,7 +207,7 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler {
return null;
}
} catch (Throwable e) {
// swallow everything cuz plugins being plugins
// swallow everything because plugins
logger.error(
"Requirement test for command node " + source + " encountered an exception", e);
}