Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
If a command is defined on the proxy, don't include suggestions from the backend too
Dieser Commit ist enthalten in:
Ursprung
10a14af2ea
Commit
ba7cdac812
@ -175,6 +175,10 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler {
|
|||||||
filterNode(server.getCommandManager().getDispatcher().getRoot());
|
filterNode(server.getCommandManager().getDispatcher().getRoot());
|
||||||
Collection<CommandNode<CommandSource>> proxyNodes = dispatcherRootNode.getChildren();
|
Collection<CommandNode<CommandSource>> proxyNodes = dispatcherRootNode.getChildren();
|
||||||
for (CommandNode<CommandSource> node : proxyNodes) {
|
for (CommandNode<CommandSource> node : proxyNodes) {
|
||||||
|
CommandNode<CommandSource> existingServerChild = rootNode.getChild(node.getName());
|
||||||
|
if (existingServerChild != null) {
|
||||||
|
rootNode.getChildren().remove(existingServerChild);
|
||||||
|
}
|
||||||
rootNode.addChild(node);
|
rootNode.addChild(node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -203,7 +207,7 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
// swallow everything cuz plugins being plugins
|
// swallow everything because plugins
|
||||||
logger.error(
|
logger.error(
|
||||||
"Requirement test for command node " + source + " encountered an exception", e);
|
"Requirement test for command node " + source + " encountered an exception", e);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren