コード例 #1
0
 @EventHandler(priority = EventPriority.MONITOR)
 public void onPlayerQuit(PlayerQuitEvent 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();
   }
 }
コード例 #2
0
  @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);
  }
コード例 #3
0
  private void playerLeave(Player player) {
    if (TotalFreedomMod.fuckoffEnabledFor.containsKey(player)) {
      TotalFreedomMod.fuckoffEnabledFor.remove(player);
    }

    final TFM_PlayerData playerdata = TFM_PlayerData.getPlayerData(player);

    playerdata.disarmMP44();

    if (playerdata.isCaged()) {
      playerdata.regenerateHistory();
      playerdata.clearHistory();
    }

    TFM_PlayerList.removeEntry(player);
    TFM_Log.info("[EXIT] " + player.getName() + " left the game.", true);
  }