use of com.greatmancode.legendarybot.plugins.wowlink.WoWLinkPlugin in project legendarybot by greatman.
the class WowCommand method preFlight.
@Override
default String[] preFlight(MessageReceivedEvent event, LegendaryBot bot, String[] args) {
String[] newArgs = args;
if (args.length == 0) {
WoWLinkPlugin plugin = ((WoWLinkPlugin) bot.getPluginManager().getPlugin("wowLink").getPlugin());
String character = plugin.getMainCharacterForUserInGuild(event.getAuthor(), event.getGuild());
if (character != null) {
newArgs = new String[1];
newArgs[0] = character;
}
}
return newArgs;
}
Aggregations