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/Fight.java

44 Zeilen
940 B
Java

package me.yaruma.fightsystem.fight;
import org.bukkit.entity.Player;
public class Fight {
public static FightTeam redTeam;
public static FightTeam blueTeam;
public static FightTeam getPlayerTeam(Player player) {
if(redTeam.isPlayerInTeam(player)) {
return redTeam;
}
if(blueTeam.isPlayerInTeam(player)) {
return blueTeam;
}
return null;
}
public static FightTeam getOpposite(FightTeam fightTeam) {
if(fightTeam == redTeam) {
return blueTeam;
}
if(fightTeam == blueTeam) {
return redTeam;
}
return null;
}
public void broadcast(String message) {
blueTeam.broadcast(message);
redTeam.broadcast(message);
}
public static FightTeam getRedTeam() {
return redTeam;
}
public static FightTeam getBlueTeam() {
return blueTeam;
}
}