Examples of performCommand()


Examples of org.bukkit.entity.Player.performCommand()

   * @return
   */
  public static Boolean run(CommandSender sender, String alias, String[] args) {
    if (PlayerHelper.checkIsPlayer(sender) && !Utils.checkCommandSpam((Player) sender, "suicide")) {
      Player player = (Player)sender;
      player.performCommand("kill");
    }
        return true;
  }
}
View Full Code Here

Examples of org.bukkit.entity.Player.performCommand()

        if (event.getAction() == Action.RIGHT_CLICK_BLOCK && event.getClickedBlock().getState() instanceof Sign) {
            try {
                Sign sign = ((Sign) event.getClickedBlock().getState());
                if (OpenInv.hasPermission(player, Permissions.PERM_OPENINV) && sign.getLine(0).equalsIgnoreCase("[openinv]")) {
                    String text = sign.getLine(1).trim() + sign.getLine(2).trim() + sign.getLine(3).trim();
                    player.performCommand("openinv " + text);
                }
            }
            catch (Exception ex) {
                player.sendMessage("Internal Error.");
                ex.printStackTrace();
View Full Code Here

Examples of org.bukkit.entity.Player.performCommand()

        if (event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
            if (!(player.getItemInHand().getType().getId() == OpenInv.GetItemOpenInvItem()) || (!OpenInv.GetPlayerItemOpenInvStatus(player.getName())) || !OpenInv.hasPermission(player, Permissions.PERM_OPENINV)) {
                return;
            }

            player.performCommand("openinv");
        }
    }
}
View Full Code Here

Examples of org.bukkit.entity.Player.performCommand()

            schedulable = false)
    public boolean performCommand(final String playerName, final String command) {
        final Player player = Bukkit.getPlayer(playerName);
        if (player != null)
            if (!command.equals(""))
                return player.performCommand(command);
        return false;
    }

    /**
     * Removes a player from the whitelist
View Full Code Here

Examples of org.bukkit.entity.Player.performCommand()

      if (match != null && match.getCurrentState().isBeforeMatch() &&
        match.inStartRegion(event.getClickedBlock().getLocation()))
      {
        // execute the command on the sign (and hope like hell that AutoReferee picks it up)
        if (event.getAction() == Action.RIGHT_CLICK_BLOCK)
          player.performCommand(ChatColor.stripColor(lines[1] + " " + lines[2]).trim());
        event.setCancelled(true);
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.