File tree Expand file tree Collapse file tree
src/main/java/net/wurstclient/command Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,6 +108,12 @@ private boolean runHackShortcut(String input)
108108 String [] args = input .trim ().split ("\\ s+" );
109109 if (args .length == 0 || args [0 ].isEmpty ())
110110 return false ;
111+
112+ // If a real command shares this name, let the command parser handle it.
113+ // This keeps legacy commands like .autofly working even when the hack
114+ // name is also runnable as a shortcut.
115+ if (cmds .getCmdByName (args [0 ]) != null )
116+ return false ;
111117
112118 Hack hack = WurstClient .INSTANCE .getHax ().getHackByName (args [0 ]);
113119 if (hack == null )
@@ -140,10 +146,6 @@ private boolean runHackShortcut(String input)
140146 }
141147 }
142148
143- // Let same-name commands continue to support their own extra arguments.
144- if (cmds .getCmdByName (args [0 ]) != null )
145- return false ;
146-
147149 ChatUtils
148150 .error ("Syntax: " + getPrefix () + args [0 ] + " [on|off|toggle]" );
149151 return true ;
You can’t perform that action at this time.
0 commit comments