SteamWar/FightSystem
Archiviert
13
1
Dieses Repository wurde am 2024-08-05 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
FightSystem/FightSystem_Main/src/de/steamwar/fightsystem/fight/FightPlayer.java

56 Zeilen
1.2 KiB
Java

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