Package net.aufdemrand.denizen.utilities.command.exceptions

Examples of net.aufdemrand.denizen.utilities.command.exceptions.CommandException


        if (sender instanceof Player) player = dPlayer.mirrorBukkitPlayer((Player) sender);

        if (args.hasValueFlag("player"))
            player = dPlayer.valueOf(args.getFlag("player"));

        if (player == null) throw new CommandException("Specified player not online or not found!");

        Map<String,AbstractListener> listeners = denizen.getListenerRegistry().getListenersFor(player);

        if (listeners == null || listeners.isEmpty()) {
            Messaging.send(sender, player.getName() + " has no active listeners.");
View Full Code Here


                    paginator.addLine("<a>" + scriptContainer.getContainerType().substring(0, 3) + "  <b>" + script);
            } else paginator.addLine("<a>" + scriptContainer.getContainerType().substring(0, 3) + "  <b>" + script);
        }
        // Send the contents of the Paginator to the Player (or Console)
        if (!paginator.sendPage(sender, args.getInteger(1, 1)))
            throw new CommandException("The page " + args.getInteger(1, 1) + " does not exist.");
    }
View Full Code Here

                    x = Double.parseDouble(parts[0]);
                    y = Double.parseDouble(parts[1]);
                    z = Double.parseDouble(parts[2]);
                    break;
                default:
                    throw new CommandException("Location could not be parsed or was not found.");
            }
            World world = Bukkit.getWorld(worldName);
            if (world == null)
                throw new CommandException("Location could not be parsed or was not found.");
            return new Location(world, x, y, z, yaw, pitch);
        } else {
            Player search = Bukkit.getPlayerExact(flag);
            if (search == null)
                throw new CommandException("No player could be found by that name.");
            return search.getLocation();
        }
    }
View Full Code Here

TOP

Related Classes of net.aufdemrand.denizen.utilities.command.exceptions.CommandException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.