1717
1818package me .despical .commandframework ;
1919
20+ import me .despical .commandframework .utils .Utils ;
2021import org .bukkit .ChatColor ;
2122import org .bukkit .command .*;
2223import org .bukkit .entity .Player ;
@@ -142,9 +143,9 @@ public void registerCommands(@NotNull Object instance) {
142143 final Completer completer = method .getAnnotation (Completer .class );
143144
144145 if (completer .name ().contains ("." )) {
145- subCommandCompletions .put (completer , me . despical . commons . util . Collections .mapEntry (method , instance ));
146+ subCommandCompletions .put (completer , Utils .mapEntry (method , instance ));
146147 } else {
147- commandCompletions .put (completer , me . despical . commons . util . Collections .mapEntry (method , instance ));
148+ commandCompletions .put (completer , Utils .mapEntry (method , instance ));
148149 }
149150 }
150151 }
@@ -161,9 +162,9 @@ private void registerCommand(Command command, Method method, Object instance) {
161162 final String cmdName = command .name ();
162163
163164 if (cmdName .contains ("." )) {
164- subCommands .put (command , me . despical . commons . util . Collections .mapEntry (method , instance ));
165+ subCommands .put (command , Utils .mapEntry (method , instance ));
165166 } else {
166- commands .put (command , me . despical . commons . util . Collections .mapEntry (method , instance ));
167+ commands .put (command , Utils .mapEntry (method , instance ));
167168
168169 try {
169170 final Constructor <PluginCommand > constructor = PluginCommand .class .getDeclaredConstructor (String .class , Plugin .class );
@@ -200,7 +201,7 @@ private Map.Entry<Command, Map.Entry<Method, Object>> getAssociatedCommand(@NotN
200201
201202 // If we found the sub command then return it, otherwise search the commands map
202203 if (command != null ) {
203- return me . despical . commons . util . Collections .mapEntry (command , subCommands .get (command ));
204+ return Utils .mapEntry (command , subCommands .get (command ));
204205 }
205206
206207 // If our command is not a sub command then search for a main command
@@ -217,7 +218,7 @@ private Map.Entry<Command, Map.Entry<Method, Object>> getAssociatedCommand(@NotN
217218 if (command != null ) {
218219 // Quick fix to accept any match consumer if defined
219220 if (command .min () >= possibleArgs .length || command .allowInfiniteArgs ()) {
220- return me . despical . commons . util . Collections .mapEntry (command , commands .get (command ));
221+ return Utils .mapEntry (command , commands .get (command ));
221222 }
222223 }
223224
@@ -231,7 +232,7 @@ private boolean hasCooldown(final CommandSender sender, final Command command) {
231232 final Map <Command , Long > cooldownMap = cooldowns .get (sender );
232233
233234 if (cooldownMap == null ) {
234- cooldowns .put (sender , me . despical . commons . util . Collections .mapOf (command , System .currentTimeMillis ()));
235+ cooldowns .put (sender , Utils .mapOf (command , System .currentTimeMillis ()));
235236 return false ;
236237 } else if (!cooldownMap .containsKey (command )) {
237238 cooldownMap .put (command , System .currentTimeMillis ());
@@ -313,7 +314,7 @@ private Map.Entry<Completer, Map.Entry<Method, Object>> getAssociatedCompleter(@
313314 }
314315
315316 if (completer != null ) {
316- return me . despical . commons . util . Collections .mapEntry (completer , subCommandCompletions .get (completer ));
317+ return Utils .mapEntry (completer , subCommandCompletions .get (completer ));
317318 }
318319
319320 for (Completer comp : commandCompletions .keySet ()) {
@@ -326,7 +327,7 @@ private Map.Entry<Completer, Map.Entry<Method, Object>> getAssociatedCompleter(@
326327 }
327328
328329 if (completer != null ) {
329- return me . despical . commons . util . Collections .mapEntry (completer , commandCompletions .get (completer ));
330+ return Utils .mapEntry (completer , commandCompletions .get (completer ));
330331 }
331332
332333 return null ;
0 commit comments