private void safeUnban( final String playerName, final CommandSender commandSender, final boolean silentFlag) { try { Banlist.unban(playerName); Bukkit.getLogger() .info(String.format("%s unbanned by %s", playerName, commandSender.getName())); if (!silentFlag) { Bukkit.broadcastMessage( AsshatModule.formatBroadcastMessage( configuration.getUnbanBroadcastMsg(), playerName, commandSender.getName(), "")); } } catch (Exception ex) { ex.printStackTrace(); commandSender.sendMessage(String.format("Something went wrong: %s", ex.getMessage())); } }
/** * Creates a new unban command executor. * * @param module The owning module. */ public UnbanCommandExecutor(final AsshatModule module) { configuration = (AsshatModuleConfiguration) module.getConfiguration(); }