forked from GeyserMC/Geyser
Remove duplicate commands by name (#474)
* Remove duplicate commands by name * Removed comment
This commit is contained in:
parent
9846058377
commit
692e46146c
1 changed files with 1 additions and 0 deletions
|
@ -59,6 +59,7 @@ public class JavaServerDeclareCommandsTranslator extends PacketTranslator<Server
|
||||||
|
|
||||||
// Make sure we don't have duplicated commands (happens if there is more than 1 root node)
|
// Make sure we don't have duplicated commands (happens if there is more than 1 root node)
|
||||||
if (commands.containsKey(nodeIndex)) { continue; }
|
if (commands.containsKey(nodeIndex)) { continue; }
|
||||||
|
if (commands.containsValue(node.getName())) { continue; }
|
||||||
|
|
||||||
// Get and update the commandArgs list with the found arguments
|
// Get and update the commandArgs list with the found arguments
|
||||||
if (node.getChildIndices().length >= 1) {
|
if (node.getChildIndices().length >= 1) {
|
||||||
|
|
Loading…
Reference in a new issue