50 Zeilen
1.0 KiB
Java
50 Zeilen
1.0 KiB
Java
|
package me.yaruma.fightsystem.fight;
|
||
|
|
||
|
import org.bukkit.entity.Player;
|
||
|
|
||
|
public class FightPlayer {
|
||
|
|
||
|
private final Player player;
|
||
|
private boolean isOut;
|
||
|
|
||
|
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.isOnline()) {
|
||
|
this.player.sendMessage(message);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public FightPlayer(Player player, boolean isOut) {
|
||
|
this.player = player;
|
||
|
this.isOut = isOut;
|
||
|
}
|
||
|
|
||
|
public void setOut(boolean isOut) {
|
||
|
this.isOut = isOut;
|
||
|
}
|
||
|
|
||
|
public Player getPlayer() {
|
||
|
return this.player;
|
||
|
}
|
||
|
|
||
|
public boolean isOut() {
|
||
|
return this.isOut;
|
||
|
}
|
||
|
|
||
|
public boolean isLeader() {
|
||
|
if(Fight.getPlayerTeam(player).getLeader().getPlayer() == player) {
|
||
|
return true;
|
||
|
} else
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|