Package org.bukkit.command

Examples of org.bukkit.command.CommandSender


  public void senderReferencesLoginMonitor(PlayerLoginEvent event)
  {
    if (event.getResult() == Result.ALLOWED) return;
   
    String id = SenderUtil.getSenderId(event.getPlayer());
    CommandSender sender = null;
   
    SenderColl.setSenderRefferences(id, sender);
  }
View Full Code Here


 
  @EventHandler(priority = EventPriority.MONITOR)
  public void senderReferencesQuitMonitor(PlayerQuitEvent event)
  {
    String id = SenderUtil.getSenderId(event.getPlayer());
    CommandSender sender = null;
   
    SenderColl.setSenderRefferences(id, sender);
  }
View Full Code Here

 
  @EventHandler(priority = EventPriority.MONITOR)
  public void senderReferencesRegisterMonitor(MCoreSenderRegisterEvent event)
  {
    String id = SenderUtil.getSenderId(event.getSender());
    CommandSender sender = event.getSender();
   
    SenderColl.setSenderRefferences(id, sender);
  }
View Full Code Here

 
  @EventHandler(priority = EventPriority.MONITOR)
  public void senderReferencesUnregisterMonitor(MCoreSenderUnregisterEvent event)
  {
    String id = SenderUtil.getSenderId(event.getSender());
    CommandSender sender = null;
   
    SenderColl.setSenderRefferences(id, sender);
  }
View Full Code Here

    }
    else if (verbose && permissible != null)
    {
      if (permissible instanceof CommandSender)
      {
        CommandSender sender = (CommandSender)permissible;
        sender.sendMessage(getDeniedMessage(perm));
      }
    }
    return false;
  }
View Full Code Here

  {
    List<CommandSender> ret = new ArrayList<CommandSender>(Arrays.asList(Bukkit.getOnlinePlayers()));
    for (Entry<String, CommandSender> entry : idToSender.entrySet())
    {
      String id = entry.getKey();
      CommandSender sender = entry.getValue();
      if (isPlayerId(id)) continue;
      ret.add(sender);
    }
    return ret;
  }
View Full Code Here

  public static String senderIdFromObject(Object o)
  {
    if (o == null) return null;
    if (o instanceof String) return (String)o;
    if (o instanceof SenderEntity) return ((SenderEntity<?>)o).getId();
    CommandSender sender = senderFromObject(o);
    if (sender == null) return null;
    return SenderUtil.getSenderId(sender);
  }
View Full Code Here

                if (entry.getValue().remainingTime < warmupTime) {
                    entry.getValue().remainingTime++;
                } else if (entry.getValue().remainingTime == warmupTime) {
                    // Reached the needed time, run a scheduler task to execute the command
                    // back on the main thread.
                    final CommandSender owner = state.getOwner();
                    if (owner != null) {
                        CommandBook.server().getScheduler().callSyncMethod(CommandBook.inst(), new Callable<Boolean>() {
                            @Override
                            public Boolean call() {
                                return CommandBook.server().dispatchCommand(owner, entry.getValue().fullCommand);
View Full Code Here

    public class CooldownCommands extends SubCommands<Map.Entry<String, Integer>> {

        @Command(aliases = {"list", "ls"}, desc = "List active command limitations", usage = "[-p page] [player]", flags = "p:", min = 0, max = 1)
        public void list(CommandContext args, CommandSender sender) throws CommandException {
            CommandSender target;
            if (args.argsLength() == 0) {
                target = sender;
            } else {
                target = InputUtil.PlayerParser.matchPlayerOrConsole(sender, args.getString(0));
            }
View Full Code Here

    public class WarmupCommands extends SubCommands<WarmupInfo> {

        @Command(aliases = {"list", "ls"}, desc = "List active command limitations", usage = "[-p page] [player]", flags = "p:", min = 0, max = 1)
        public void list(CommandContext args, CommandSender sender) throws CommandException {
            CommandSender target;
            if (args.argsLength() == 0) {
                target = sender;
            } else {
                target = InputUtil.PlayerParser.matchPlayerOrConsole(sender, args.getString(0));
            }
View Full Code Here

TOP

Related Classes of org.bukkit.command.CommandSender

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.