=SubCommand Routine modifications
This commit is contained in:
@@ -27,8 +27,17 @@ public class SubCommandFramework
|
||||
|
||||
public SubCommandFormattable run(KittyGuild guild, KittyChannel channel, KittyUser user, String input)
|
||||
{
|
||||
System.out.print(input);
|
||||
SubCommandFormattable res = commands.get(input.split(" ")[0].toLowerCase()).OnRun(guild, channel, user, input.substring(input.indexOf(" ")));
|
||||
System.out.println(input);
|
||||
SubCommandFormattable res = null;
|
||||
try
|
||||
{
|
||||
res = commands.get(input.split(" ")[0].toLowerCase()).OnRun(guild, channel, user, input.substring(input.indexOf(" ")));
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
res = commands.get(input.split(" ")[0].toLowerCase()).OnRun(guild, channel, user, "");
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user