package de.steamwar.fightsystem.fight; import de.steamwar.fightsystem.kit.KitManager; import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.kit.Kit; import org.bukkit.entity.Player; public class FightPlayer { private final Player player; private final FightTeam team; private boolean isOut; private Kit kit; private int kills; public void sendMessage(String message) { if (this.player != null && this.player.isOnline()) this.player.sendMessage(message); } FightPlayer(Player player, FightTeam team) { this.player = player; this.team = team; this.isOut = false; kit = KitManager.getKitByName(Config.MemberDefault); kills = 0; } public void setOut() { isOut = true; } public Player getPlayer() { return this.player; } public boolean isLiving() { return !this.isOut; } public boolean isLeader() { FightPlayer leader = team.getLeader(); return leader != null && leader.getPlayer() == player; } public Kit getKit() { return kit; } public void setKit(Kit kit) { this.kit = kit; } public FightTeam getTeam(){ return team; } public int getKills(){ return kills; } public void addKill(){ kills++; } }