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/src/me/yaruma/fightsystem/fight/FightPlayer.java
2019-04-13 16:30:25 +02:00

56 Zeilen
1.3 KiB
Java

package me.yaruma.fightsystem.fight;
import me.yaruma.fightsystem.kit.Kit;
import me.yaruma.fightsystem.kit.KitManager;
import me.yaruma.fightsystem.utils.Config;
import org.bukkit.entity.Player;
public class FightPlayer {
private final Player player;
private boolean isOut;
private Kit kit;
public boolean equals(Object obj) {
if (!(obj instanceof Player))
return false;
Player comp = (Player)obj;
return this.player.getUniqueId().equals(comp.getUniqueId());
}
public void sendMessage(String message) {
if (this.player != null && this.player.isOnline())
this.player.sendMessage(message);
}
public FightPlayer(Player player, boolean isOut) {
this.player = player;
this.isOut = isOut;
kit = KitManager.getKitByName(Config.MemberDefault);
}
public void setOut(boolean isOut) {
this.isOut = isOut;
}
public Player getPlayer() {
return this.player;
}
public boolean isOut() {
return this.isOut;
}
public boolean isLeader() {
return Fight.getPlayerTeam(player).getLeader().getPlayer() == player;
}
public Kit getKit() {
return kit;
}
public void setKit(Kit kit) {
this.kit = kit;
}
}