예제 #1
0
 @Override
 public void onPlayerKick(PlayerKickEvent event) {
   Player triggerMessage = event.getPlayer();
   String[] replaceThese = {"<<kick-reason>>", "<<kickedplayer>>"};
   String[] withThese = {event.getReason(), triggerMessage.getName()};
   plugin.triggerMessages(triggerMessage, "onkick", replaceThese, withThese);
 }
예제 #2
0
  public void disconnect(String s) {
    // CraftBukkit start
    String leaveMessage = "\u00A7e" + this.player.name + " left the game.";
    PlayerKickEvent event = new PlayerKickEvent(server.getPlayer(this.player), s, leaveMessage);
    server.getPluginManager().callEvent(event);
    if (event.isCancelled()) {
      // Do not kick the player
      return;
    }
    // Send the possibly modified leave message
    s = event.getReason();
    // CraftBukkit end

    this.player.A();
    this.sendPacket(new Packet255KickDisconnect(s));
    this.networkManager.d();

    // CraftBukkit start
    leaveMessage = event.getLeaveMessage();
    if (leaveMessage != null) {
      this.minecraftServer.serverConfigurationManager.sendAll(new Packet3Chat(leaveMessage));
    }
    // CraftBukkit end

    this.minecraftServer.serverConfigurationManager.disconnect(this.player);
    this.disconnected = true;
  }
예제 #3
0
 @EventHandler
 public void playerKicked(PlayerKickEvent event) {
   Player player = event.getPlayer();
   plugin.bot.sendMessage(
       plugin.getIRCChannel(),
       "[" + player.getName() + "] had been kicked off " + plugin.getServerName());
 }
 @EventHandler(priority = EventPriority.MONITOR)
 public void onPlayerKick(PlayerKickEvent event) {
   Player p = event.getPlayer();
   if (TotalFreedomMod.fuckoffEnabledFor.containsKey(p)) {
     TotalFreedomMod.fuckoffEnabledFor.remove(p);
   }
   TFM_PlayerData playerdata = TFM_PlayerData.getPlayerData(p);
   playerdata.disarmMP44();
   if (playerdata.isCaged()) {
     playerdata.regenerateHistory();
     playerdata.clearHistory();
   }
 }
  @EventHandler(priority = EventPriority.MONITOR)
  public void onPlayerKick(PlayerKickEvent event) {
    Player player = event.getPlayer();
    if (TotalFreedomMod.fuckoffEnabledFor.containsKey(player)) {
      TotalFreedomMod.fuckoffEnabledFor.remove(player);
    }
    TFM_PlayerData playerdata = TFM_PlayerData.getPlayerData(player);
    playerdata.disarmMP44();
    if (playerdata.isCaged()) {
      playerdata.regenerateHistory();
      playerdata.clearHistory();
    }

    TFM_Log.info("[EXIT] " + player.getName() + " left the game.", true);
  }
예제 #6
0
 @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
 public void onPlayerKick(PlayerKickEvent event) {
   plugin.debug("Player " + event.getPlayer().getName() + " was kicked, unregistering...");
   plugin.unregisterPlayer(event.getPlayer());
 }
 @EventHandler
 public void onKick(PlayerKickEvent e) {
   PConfManager.setPValLong(e.getPlayer(), new Date().getTime(), "seen");
   if (AFKUtils.isAfk(e.getPlayer())) AFKUtils.unsetAfk(e.getPlayer());
   if (AFKUtils.moveTimesContains(e.getPlayer())) AFKUtils.removeLastMove(e.getPlayer());
 }