public void execute(Player player, String[] args) throws CommandPermissionException, CommandSyntaxException { if (!player.hasPermission("zawmg.warp.list")) { throw new CommandPermissionException("zawmg.warp.list"); } List<WarpDetails> warps = WarpModel.getWarps( config.getWarpDatabase(), config.getUUIDService().getMeta(player), config.getEconomyUpkeepPrice()); if (warps.isEmpty()) { player.sendMessage( MessageConstants.format( "&8(&5Warp&8) &cYou do not seem to own any warps!", new Object[0])); return; } player.sendMessage( MessageConstants.format("&8&m&l----------------------------------", new Object[0])); player.sendMessage( MessageConstants.format("&8(&5Warp&8) &eYou own the following warps:", new Object[0])); for (WarpDetails warp : warps) { player.sendMessage( MessageConstants.format( "&8(&5Warp&8) &8\"&6%s&8\" &6Daily Upkeep: &a%s", new Object[] {warp.getName(), config.getEconomy().format(warp.getUpkeep())})); } player.sendMessage( MessageConstants.format("&8&m&l----------------------------------", new Object[0])); }
public void execute(Player player, String[] args) throws CommandPermissionException, CommandSyntaxException { if (!player.hasPermission("zawmg.warp.use")) { throw new CommandPermissionException("zawmg.warp.use"); } player.sendMessage( MessageConstants.format("&8&m&l----------------------------------", new Object[0])); player.sendMessage(MessageConstants.format("&8(&5Warp&8) &eHelp Documentation", new Object[0])); for (HelpEntry helpEntry : helpEntries) { if (player.hasPermission(helpEntry.permission)) { player.sendMessage( MessageConstants.format("&8(&5Warp&8) &6%s", new Object[] {helpEntry.command})); } } player.sendMessage( MessageConstants.format("&8&m&l----------------------------------", new Object[0])); }