Examples of kickPlayer()


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

        final Player target = targettmp;
        if (target != null) {
            plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
                @Override
                public void run() {
                    target.kickPlayer(kickReason);
                }
            }, 0L);
        }
    }
View Full Code Here

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

            // kick player
            plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
                @Override
                public void run() {
                    player.kickPlayer(_("kickPlayer", I18n.PLAYER, player.getName(), I18n.SENDER, senderName, I18n.REASON, reason));
                }
            }, 0L);

            Util.broadcastMessage(ChatColor.GREEN + _("kickBroadcast", I18n.PLAYER, player.getName(), I18n.SENDER, senderName, I18n.REASON, reason));
            plugin.getLog().info(senderName + " has kicked " + player.getName() + " [" + reason + "]");
View Full Code Here

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

                player.sendMessage(m._("login"));
                ConsoleLogger.info(player.getDisplayName() + " logged in!");
            } else {
                ConsoleLogger.info(player.getDisplayName() + " used the wrong password");
                if (settings.isKickOnWrongPasswordEnabled()) {
                    player.kickPlayer(m._("wrong_pwd"));
                } else {
                    player.sendMessage(m._("wrong_pwd"));
                }
            }
        } catch (NoSuchAlgorithmException ex) {
View Full Code Here

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

            aliases = {"ban", "banPlayer", "bannedAdd"})
    public boolean ban(final String playerName) {
        Bukkit.getOfflinePlayer(playerName).setBanned(true);
        final Player onlinePlayer = Bukkit.getPlayer(playerName);
        if (onlinePlayer != null)
            onlinePlayer.kickPlayer("You have been banned!");
        PlayerLogger.setCase(playerName);
        return true;
    }

    /**
 
View Full Code Here

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

            aliases = {"kick", "kickPlayer"},
            schedulable = false)
    public boolean kick(final String playerName, final String message) {
        final Player player = Bukkit.getPlayer(playerName);
        if (player != null) {
            player.kickPlayer(message);
            return true;
        }
        return false;
    }
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.