Examples of kickPlayer()


Examples of net.glowstone.entity.GlowPlayer.kickPlayer()

    public void handle(GlowSession session, CreativeItemMessage message) {
        final GlowPlayer player = session.getPlayer();

        // only if creative mode
        if (player.getGameMode() != GameMode.CREATIVE) {
            player.kickPlayer("Illegal creative mode item selection");
            return;
        }

        // only if default (player) inventory
        if (!GlowInventoryView.isDefault(player.getOpenInventory())) {
View Full Code Here

Examples of net.glowstone.entity.GlowPlayer.kickPlayer()

            return;
        }

        // only if default (player) inventory
        if (!GlowInventoryView.isDefault(player.getOpenInventory())) {
            player.kickPlayer("Illegal creative mode item selection");
            return;
        }

        if (message.getSlot() < 0) {
            // todo: drop outside
View Full Code Here

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

      CommandsEX.plugin.getServer().broadcastMessage(ChatColor.LIGHT_PURPLE + (!reason.equals("") ? (pDispName + " " + _("bansBeingBannedForMessage", "") + reason) : pDispName + " " + _("bansBeingBannedMessage", "")) + (!t.containsKey("not_found") ? " " + _("for", "") + " " + args[1].replace("t:", "") : ""));
    }

    // at last, kick the player if still online
    if (!isOffline) {
      p.kickPlayer(ChatColor.RED + (!reason.equals("") ? (_("bansYouAreBannedForMessage", "") + reason) :  _("bansGenericReason", "")));
    }
   
        return true;
  }
 
View Full Code Here

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

    while (it.hasNext()) {
      Map.Entry<String, String> pairs = (Map.Entry<String, String>)it.next();
      if (pairs.getValue().equals(ip)) {
        Player p = Bukkit.getServer().getPlayer(pairs.getKey());
        if (p != null) {
          p.kickPlayer(ChatColor.RED + (!reason.equals("") ? (_("bansYouAreBannedForMessage", "") + reason) :  _("bansGenericReason", "")));
        }
      }
    }
   
    // and inform the person who was banning, of course
View Full Code Here

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

        leaveReason = leaveReason + " " + args[i];
      }
    }
   
    // kick player and tell everyone if set up in the config file
    p.kickPlayer(ChatColor.RED + (leaveReason.equals("") ? _("kickGenericReason", "") : leaveReason));
    if (!CommandsEX.getConf().getBoolean("silentKicks")) {
      CommandsEX.plugin.getServer().broadcastMessage(ChatColor.LIGHT_PURPLE + (!leaveReason.equals("") ? (Nicknames.getNick(pName) + " " + _("kickBeingKickedForMessage", "") + leaveReason) : Nicknames.getNick(pName) + " " + _("kickBeingKickedMessage", "")));
    }
   
    return true;
View Full Code Here

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

        kickMsg = "kickAllSuccessReason#####[" + " " + kickMsg + Utils.implode(args, " ");
      }
     
      for (Player player : Bukkit.getOnlinePlayers()){
        if (!player.hasPermission("cex.bypass.kick") && player != sender){
          player.kickPlayer(kickMsg);
        }
      }

      LogHelper.showInfo("kickAllSuccessReason#####[" + " " + kickMsg, sender, ChatColor.GREEN);
    }
View Full Code Here

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

      if (p == null){
        continue;
      }
     
      if (kickEnabled && p.hasPermission("cex.afk.kick") && (System.currentTimeMillis() - playerIdleTime.get(player)) / 1000 >= kickTime){
        p.kickPlayer(kickMessage);
       
        // send the kick message to each player in their own language
        for (Player pl : Bukkit.getOnlinePlayers()){
          LogHelper.showWarning("[" + ChatColor.RED + player + " #####afkKickNotify", pl);
        }
View Full Code Here

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

  }
 
  void kick(CommandSender sender, String name, String reason) {
    Player player = DataManager.getPlayer(name);
    if (player == null) return;
    player.kickPlayer(reason);
    LogUtil.logInfo("[NoCheatPlus] (" + sender.getName() + ") Kicked " + player.getName() + " : " + reason);
  }

  /* (non-Javadoc)
   * @see fr.neatmonster.nocheatplus.command.AbstractCommand#onTabComplete(org.bukkit.command.CommandSender, org.bukkit.command.Command, java.lang.String, java.lang.String[])
View Full Code Here

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

 
  protected void denyLogin(CommandSender sender, String name, long duration, String reason){
    Player player = DataManager.getPlayer(name);
    NCPAPIProvider.getNoCheatPlusAPI().denyLogin(name, duration);
    if (player == null) return;
    player.kickPlayer(reason);
    LogUtil.logInfo("[NoCheatPlus] (" + sender.getName() + ") Kicked " + player.getName() + " for " + duration/60000 +" minutes: " + reason);
  }

  /* (non-Javadoc)
   * @see fr.neatmonster.nocheatplus.command.AbstractCommand#onTabComplete(org.bukkit.command.CommandSender, org.bukkit.command.Command, java.lang.String, java.lang.String[])
View Full Code Here

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

      } else {
        LogUtil.logWarning("Might not be a valid user name: " + name);
      }
    }
    if (player != null){
      player.kickPlayer(reason);
    }
    // Relay to the server command for compatibility reasons.
    server.dispatchCommand(server.getConsoleSender(), "ban " + name);
    logBan(sender, player, name, reason);
   
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.