Examples of kickPlayer()


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

          "Player '"+playerName+"' no longer allowed.");

      Player player = plugin.getPlayerByDisplayName(playerName);

      if(player != null) {
        player.kickPlayer(plugin.config.banMessage);

          String opName;
          if(op instanceof Player)
            opName = ((Player)op).getName();
          else
View Full Code Here

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

          Player player = plugin.getPlayerByDisplayName(playerName);

          if(player != null) {
            String opName;

            player.kickPlayer(plugin.config.kickMessage);
            op.sendMessage(ChatColor.YELLOW+"Player kicked from server.");

            if(op instanceof Player)
              opName = ((Player)op).getName();
            else
View Full Code Here

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

        Location locLanceur = lanceur.getLocation();
        cible.teleport(locLanceur);
        cible.setHealth(0);
        cible.setBanned(true);
        cible.kickPlayer("Le gourdin du bannissement a frappé !");
        String pseudoLanceur = lanceur.getDisplayName();
        String pseudoCible = cible.getDisplayName();
        lanceur.getServer().broadcastMessage(pseudoLanceur+" a banni "+pseudoCible);
     
        return true;
View Full Code Here

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

            if (args.length > 1) {
                reason = createString(args, 1);
            }

            player.kickPlayer(reason);
            Command.broadcastCommandMessage(sender, "Kicked player " + player.getName() + ". With reason:\n" + reason);
        } else {
            sender.sendMessage( args[0] + " not found.");
        }
View Full Code Here

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

        String reason = args.length > 0 ? StringUtils.join(args, ' ', 1, args.length) : null;
        Bukkit.getBanList(BanList.Type.NAME).addBan(args[0], reason, null, sender.getName());

        Player player = Bukkit.getPlayer(args[0]);
        if (player != null) {
            player.kickPlayer("Banned by admin.");
        }

        Command.broadcastCommandMessage(sender, "Banned player " + args[0]);
        return true;
    }
View Full Code Here

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

  @Override
  public boolean kick(CommandSender sender, String message)
  {
    Player player = SenderUtil.getAsPlayer(sender);
    if (player == null) return false;
    player.kickPlayer(message);
    return true;
  }
 
  @Override
  public boolean kick(String senderId, String message)
View Full Code Here

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

  @Override
  public boolean kick(String senderId, String message)
  {
    Player player = SenderUtil.getPlayer(senderId);
    if (player == null) return false;
    player.kickPlayer(message);
    return true;
  }
 
}
View Full Code Here

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

                if (args.hasFlag('i')) {
                    CommandBook.inst().checkPermission(sender, "commandbook.bans.ban.ip");
                    banAddress = player.getAddress().getAddress();
                    for (Player aPlayer : CommandBook.server().getOnlinePlayers()) {
                        if (aPlayer.getAddress().getAddress().equals(banAddress)) {
                            player.kickPlayer(message == null ? "Banned!" : message);
                            getBanDatabase().logKick(player, sender, message);
                        }
                    }
                } else {
                    player.kickPlayer(message == null ? "Banned!" : message);
View Full Code Here

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

                            player.kickPlayer(message == null ? "Banned!" : message);
                            getBanDatabase().logKick(player, sender, message);
                        }
                    }
                } else {
                    player.kickPlayer(message == null ? "Banned!" : message);
                    getBanDatabase().logKick(player, sender, message);
                }
            }

            sender.sendMessage(ChatColor.YELLOW + playerName + " banned" + (!kicked ? "" : " and kicked") + '.');
View Full Code Here

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

                    server.getScheduler().runTaskLater(inst, new Runnable() {

                        @Override
                        public void run() {

                            target.kickPlayer("Inactivity - " + (System.currentTimeMillis() - session.getLastUpdate()) / 60000 + " Minutes");
                        }
                    }, 1);
                } else if (!session.isAFK()) {

                    // Grey out list name
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.