@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(); } }
@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); }