Merge pull request 'Fix wincondition messages' (#249) from fixMessages into master
Reviewed-on: #249 Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
Commit
2705bda00d
@ -20,19 +20,22 @@
|
||||
package de.steamwar.fightsystem.winconditions;
|
||||
|
||||
import de.steamwar.fightsystem.ArenaMode;
|
||||
import de.steamwar.fightsystem.FightSystem;
|
||||
import de.steamwar.fightsystem.fight.Fight;
|
||||
import de.steamwar.fightsystem.fight.FightTeam;
|
||||
import de.steamwar.fightsystem.states.FightState;
|
||||
import de.steamwar.fightsystem.states.StateDependent;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public class EventTeamOffWincondition extends Wincondition{
|
||||
|
||||
public EventTeamOffWincondition(){
|
||||
super("TeamOffline", "§cDas Team ", " §cist offline!", "§cBeide Teams sind offline!");
|
||||
super("TeamOffline");
|
||||
new StateDependent(ArenaMode.Event, FightState.PreRunning) {
|
||||
@Override
|
||||
public void enable() {
|
||||
if(Fight.getBlueTeam().allPlayersOut() && Fight.getRedTeam().allPlayersOut()){
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cBeide Teams sind offline!");
|
||||
win(null);
|
||||
}else{
|
||||
teamOff(Fight.getBlueTeam());
|
||||
@ -49,6 +52,7 @@ public class EventTeamOffWincondition extends Wincondition{
|
||||
|
||||
private void teamOff(FightTeam team){
|
||||
if(team.allPlayersOut()){
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDas Team " + team.getColoredName() + " §cist offline!");
|
||||
win(Fight.getOpposite(team));
|
||||
}
|
||||
}
|
||||
|
@ -20,10 +20,12 @@
|
||||
package de.steamwar.fightsystem.winconditions;
|
||||
|
||||
import de.steamwar.fightsystem.ArenaMode;
|
||||
import de.steamwar.fightsystem.FightSystem;
|
||||
import de.steamwar.fightsystem.fight.Fight;
|
||||
import de.steamwar.fightsystem.fight.FightTeam;
|
||||
import de.steamwar.fightsystem.states.FightState;
|
||||
import de.steamwar.fightsystem.states.StateDependentListener;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
@ -32,7 +34,7 @@ import org.bukkit.event.player.PlayerQuitEvent;
|
||||
public class RankedPlayerLeftWincondition extends Wincondition implements Listener {
|
||||
|
||||
public RankedPlayerLeftWincondition(){
|
||||
super("LeaderQuit", "§cDer Leader von ", " §chat den Kampf verlassen!");
|
||||
super("LeaderQuit");
|
||||
new StateDependentListener(ArenaMode.Ranked, FightState.Setup, this);
|
||||
}
|
||||
|
||||
@ -44,6 +46,7 @@ public class RankedPlayerLeftWincondition extends Wincondition implements Listen
|
||||
return;
|
||||
|
||||
if(team.isPlayerLeader(player)) {
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDer Leader von " + team.getColoredName() + " §chat den Kampf verlassen!");
|
||||
win(Fight.getOpposite(team));
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,6 @@ import de.steamwar.fightsystem.countdown.Countdown;
|
||||
import de.steamwar.fightsystem.fight.Fight;
|
||||
import de.steamwar.fightsystem.fight.FightTeam;
|
||||
import de.steamwar.fightsystem.states.StateDependentCountdown;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -37,23 +36,9 @@ public abstract class Wincondition {
|
||||
protected static final List<PrintableWincondition> printableWinconditions = new ArrayList<>();
|
||||
|
||||
private final String windescription;
|
||||
private final String preteammessage;
|
||||
private final String postteammessage;
|
||||
private final String tiemessage;
|
||||
|
||||
protected Wincondition(String windescription, String tiemessage) {
|
||||
this(windescription, null, null, tiemessage);
|
||||
}
|
||||
|
||||
protected Wincondition(String windescription, String preteammessage, String postteammessage) {
|
||||
this(windescription, preteammessage, postteammessage, null);
|
||||
}
|
||||
|
||||
protected Wincondition(String windescription, String preteammessage, String postteammessage, String tiemessage) {
|
||||
protected Wincondition(String windescription) {
|
||||
this.windescription = windescription;
|
||||
this.preteammessage = preteammessage;
|
||||
this.tiemessage = tiemessage;
|
||||
this.postteammessage = postteammessage;
|
||||
}
|
||||
|
||||
public static Countdown getTimeOverCountdown(){
|
||||
@ -62,17 +47,7 @@ public abstract class Wincondition {
|
||||
return timeOverCountdown.getCountdown();
|
||||
}
|
||||
|
||||
protected void win(FightTeam team, String postteammessage){
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + tiemessage + team.getColoredName() + postteammessage);
|
||||
FightSystem.setSpectateState(team, windescription);
|
||||
}
|
||||
|
||||
protected void win(FightTeam team){
|
||||
if(team != null){
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + preteammessage + team.getColoredName() + postteammessage);
|
||||
}else{
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + tiemessage);
|
||||
}
|
||||
FightSystem.setSpectateState(team, windescription);
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,12 @@
|
||||
|
||||
package de.steamwar.fightsystem.winconditions;
|
||||
|
||||
import de.steamwar.fightsystem.FightSystem;
|
||||
import de.steamwar.fightsystem.fight.Fight;
|
||||
import de.steamwar.fightsystem.fight.FightTeam;
|
||||
import de.steamwar.fightsystem.states.FightState;
|
||||
import de.steamwar.fightsystem.states.StateDependentListener;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
@ -32,7 +34,7 @@ import org.bukkit.event.player.PlayerQuitEvent;
|
||||
public class WinconditionAllDead extends Wincondition implements Listener {
|
||||
|
||||
public WinconditionAllDead(){
|
||||
super("AllDead", "§cDer letzte Spieler aus ");
|
||||
super("AllDead");
|
||||
new StateDependentListener(Winconditions.ALL_DEAD, FightState.Ingame, this);
|
||||
}
|
||||
|
||||
@ -52,7 +54,8 @@ public class WinconditionAllDead extends Wincondition implements Listener {
|
||||
return;
|
||||
|
||||
if(team.allPlayersOut()) {
|
||||
win(Fight.getOpposite(team), message);
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDer letzte Spieler aus " + team.getColoredName() + message);
|
||||
win(Fight.getOpposite(team));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,10 +19,12 @@
|
||||
|
||||
package de.steamwar.fightsystem.winconditions;
|
||||
|
||||
import de.steamwar.fightsystem.FightSystem;
|
||||
import de.steamwar.fightsystem.fight.Fight;
|
||||
import de.steamwar.fightsystem.fight.FightTeam;
|
||||
import de.steamwar.fightsystem.states.FightState;
|
||||
import de.steamwar.fightsystem.states.StateDependentListener;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
@ -32,7 +34,7 @@ import org.bukkit.event.player.PlayerQuitEvent;
|
||||
public class WinconditionCaptainDead extends Wincondition implements Listener {
|
||||
|
||||
public WinconditionCaptainDead(){
|
||||
super("LeaderDead", "§cDer Leader von ");
|
||||
super("LeaderDead");
|
||||
new StateDependentListener(Winconditions.CAPTAIN_DEAD, FightState.Ingame, this);
|
||||
}
|
||||
|
||||
@ -52,7 +54,8 @@ public class WinconditionCaptainDead extends Wincondition implements Listener {
|
||||
return;
|
||||
|
||||
if(team.isPlayerLeader(player)) {
|
||||
win(Fight.getOpposite(team), message);
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDer Leader von " + team.getColoredName() + message);
|
||||
win(Fight.getOpposite(team));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,16 +20,17 @@
|
||||
package de.steamwar.fightsystem.winconditions;
|
||||
|
||||
import de.steamwar.fightsystem.Config;
|
||||
import de.steamwar.fightsystem.FightSystem;
|
||||
import de.steamwar.fightsystem.countdown.TimeOverCountdown;
|
||||
import de.steamwar.fightsystem.fight.Fight;
|
||||
import de.steamwar.fightsystem.fight.FightTeam;
|
||||
import de.steamwar.fightsystem.states.FightState;
|
||||
import de.steamwar.fightsystem.states.StateDependentCountdown;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public class WinconditionHeartRatioTimeout extends Wincondition {
|
||||
|
||||
public WinconditionHeartRatioTimeout() {
|
||||
super("HeartTimeout", "§cDie Zeit ist abgelaufen, und Team ", " §chatte mehr verbleibende Leben!", "§cDie Zeit ist abgelaufen, und beide Teams hatten die gleiche Anzahl an verbleibenden Leben!");
|
||||
super("HeartTimeout");
|
||||
if(Config.ActiveWinconditions.contains(Winconditions.HEART_RATIO_TIMEOUT)){
|
||||
timeOverCountdown = new StateDependentCountdown(Winconditions.HEART_RATIO_TIMEOUT, FightState.Running, new TimeOverCountdown(this::timeOver));
|
||||
}
|
||||
@ -39,12 +40,15 @@ public class WinconditionHeartRatioTimeout extends Wincondition {
|
||||
double blueHeartRatio = Fight.getBlueTeam().getHeartRatio();
|
||||
double redHeartRatio = Fight.getRedTeam().getHeartRatio();
|
||||
|
||||
FightTeam team = null;
|
||||
if(blueHeartRatio > redHeartRatio)
|
||||
team = Fight.getBlueTeam();
|
||||
else if(blueHeartRatio < redHeartRatio)
|
||||
team = Fight.getRedTeam();
|
||||
|
||||
win(team);
|
||||
if(blueHeartRatio > redHeartRatio) {
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDie Zeit ist abgelaufen, und Team " + Fight.getBlueTeam().getColoredName() + " §chatte mehr verbleibende Leben!");
|
||||
win(Fight.getBlueTeam());
|
||||
}else if(blueHeartRatio < redHeartRatio){
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDie Zeit ist abgelaufen, und Team " + Fight.getRedTeam().getColoredName() + " §chatte mehr verbleibende Leben!");
|
||||
win(Fight.getRedTeam());
|
||||
}else{
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDie Zeit ist abgelaufen, und beide Teams hatten die gleiche Anzahl an verbleibenden Leben!");
|
||||
win(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,10 +20,12 @@
|
||||
package de.steamwar.fightsystem.winconditions;
|
||||
|
||||
import de.steamwar.fightsystem.Config;
|
||||
import de.steamwar.fightsystem.FightSystem;
|
||||
import de.steamwar.fightsystem.fight.Fight;
|
||||
import de.steamwar.fightsystem.fight.FightTeam;
|
||||
import de.steamwar.fightsystem.states.FightState;
|
||||
import de.steamwar.fightsystem.states.StateDependentListener;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
@ -36,7 +38,7 @@ public class WinconditionPercentSystem extends Wincondition implements Listener,
|
||||
private final Map<FightTeam, TeamPercent> teamMap = new HashMap<>();
|
||||
|
||||
public WinconditionPercentSystem() {
|
||||
super("Percent", "§cTeam ", " §chat den Gegnern");
|
||||
super("Percent");
|
||||
teamMap.put(Fight.getBlueTeam(), new TeamPercent(Fight.getBlueTeam()));
|
||||
teamMap.put(Fight.getRedTeam(), new TeamPercent(Fight.getRedTeam()));
|
||||
|
||||
@ -82,6 +84,7 @@ public class WinconditionPercentSystem extends Wincondition implements Listener,
|
||||
destroyedBlocks += event.blockList().size();
|
||||
percent = (double)destroyedBlocks * 100 / volume;
|
||||
if(percent >= Config.PercentWin) {
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cTeam " + team.getColoredName() + " §chat zu viel Schaden erlitten!");
|
||||
win(Fight.getOpposite(team));
|
||||
}
|
||||
}
|
||||
|
@ -20,16 +20,17 @@
|
||||
package de.steamwar.fightsystem.winconditions;
|
||||
|
||||
import de.steamwar.fightsystem.Config;
|
||||
import de.steamwar.fightsystem.FightSystem;
|
||||
import de.steamwar.fightsystem.countdown.TimeOverCountdown;
|
||||
import de.steamwar.fightsystem.fight.Fight;
|
||||
import de.steamwar.fightsystem.fight.FightTeam;
|
||||
import de.steamwar.fightsystem.states.FightState;
|
||||
import de.steamwar.fightsystem.states.StateDependentCountdown;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public class WinconditionPercentTimeout extends Wincondition {
|
||||
|
||||
public WinconditionPercentTimeout() {
|
||||
super("PercentTimeout", "§cDie Zeit ist abgelaufen, und Team ", " §chatte weniger Schaden erlitten!", "§cDie Zeit ist abgelaufen, und beide Teams hatten gleichen Schaden!");
|
||||
super("PercentTimeout");
|
||||
if(Config.ActiveWinconditions.contains(Winconditions.PERCENT_TIMEOUT)) {
|
||||
timeOverCountdown = new StateDependentCountdown(Winconditions.PERCENT_TIMEOUT, FightState.Running, new TimeOverCountdown(this::timeOver));
|
||||
}
|
||||
@ -39,11 +40,15 @@ public class WinconditionPercentTimeout extends Wincondition {
|
||||
double bluePercent = Wincondition.percentWincondition.getPercent(Fight.getBlueTeam());
|
||||
double redPercent = Wincondition.percentWincondition.getPercent(Fight.getRedTeam());
|
||||
|
||||
FightTeam team = null;
|
||||
if(bluePercent > redPercent)
|
||||
team = Fight.getRedTeam();
|
||||
else if(bluePercent < redPercent)
|
||||
team = Fight.getBlueTeam();
|
||||
win(team);
|
||||
if(bluePercent > redPercent) {
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDie Zeit ist abgelaufen, und Team " + Fight.getRedTeam().getColoredName() + " §chat weniger Schaden erlitten!");
|
||||
win(Fight.getRedTeam());
|
||||
}else if(bluePercent < redPercent){
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDie Zeit ist abgelaufen, und Team " + Fight.getBlueTeam().getColoredName() + " §chat weniger Schaden erlitten!");
|
||||
win(Fight.getBlueTeam());
|
||||
}else{
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDie Zeit ist abgelaufen, und beide Teams hatten gleichen Schaden erlitten!");
|
||||
win(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class WinconditionPoints extends Wincondition implements PrintableWincond
|
||||
private final Map<FightTeam, TeamPoints> teamMap = new HashMap<>();
|
||||
|
||||
public WinconditionPoints(){
|
||||
super("Points", "§cDas Team ", " §chat mehr Punkte!", "§cBeide Teams haben gleich viele Punkte!");
|
||||
super("Points");
|
||||
|
||||
teamMap.put(Fight.getBlueTeam(), new TeamPoints(Fight.getBlueTeam()));
|
||||
teamMap.put(Fight.getRedTeam(), new TeamPoints(Fight.getRedTeam()));
|
||||
@ -70,13 +70,16 @@ public class WinconditionPoints extends Wincondition implements PrintableWincond
|
||||
int redPoints = teamMap.get(Fight.getRedTeam()).getPoints();
|
||||
int bluePoints = teamMap.get(Fight.getBlueTeam()).getPoints();
|
||||
|
||||
FightTeam team = null;
|
||||
if(redPoints > bluePoints)
|
||||
team = Fight.getRedTeam();
|
||||
else if(redPoints < bluePoints)
|
||||
team = Fight.getBlueTeam();
|
||||
|
||||
win(team);
|
||||
if(bluePoints < redPoints) {
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDas Team " + Fight.getRedTeam().getColoredName() + " §chat mehr Punkte!");
|
||||
win(Fight.getRedTeam());
|
||||
}else if(bluePoints > redPoints){
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDas Team " + Fight.getBlueTeam().getColoredName() + " §chat mehr Punkte!");
|
||||
win(Fight.getBlueTeam());
|
||||
}else{
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cBeide Teams haben gleich viele Punkte!");
|
||||
win(null);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -20,6 +20,7 @@
|
||||
package de.steamwar.fightsystem.winconditions;
|
||||
|
||||
import de.steamwar.fightsystem.Config;
|
||||
import de.steamwar.fightsystem.FightSystem;
|
||||
import de.steamwar.fightsystem.fight.Fight;
|
||||
import de.steamwar.fightsystem.fight.FightTeam;
|
||||
import de.steamwar.fightsystem.states.FightState;
|
||||
@ -40,7 +41,7 @@ public class WinconditionPumpkinTechKO extends Wincondition implements Printable
|
||||
private final Map<FightTeam, TeamPumpkin> teamMap = new HashMap<>();
|
||||
|
||||
public WinconditionPumpkinTechKO(){
|
||||
super("PumpkinTechKO", "§cDas Team ", " §cist Tech K.O.!");
|
||||
super("PumpkinTechKO");
|
||||
teamMap.put(Fight.getRedTeam(), new TeamPumpkin(Fight.getRedTeam()));
|
||||
teamMap.put(Fight.getBlueTeam(), new TeamPumpkin(Fight.getBlueTeam()));
|
||||
|
||||
@ -76,6 +77,7 @@ public class WinconditionPumpkinTechKO extends Wincondition implements Printable
|
||||
});
|
||||
|
||||
if(pumpkins == 0) {
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDas Team " + team.getColoredName() + " §cist Tech K.O.!");
|
||||
win(Fight.getOpposite(team));
|
||||
}
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ public class WinconditionRelativePercent extends Wincondition implements Printab
|
||||
private final Map<FightTeam, TeamPercent> teamMap = new HashMap<>();
|
||||
|
||||
public WinconditionRelativePercent(){
|
||||
super("RelativePercent", null);
|
||||
super("RelativePercent");
|
||||
teamMap.put(Fight.getBlueTeam(), new TeamPercent(Fight.getBlueTeam()));
|
||||
teamMap.put(Fight.getRedTeam(), new TeamPercent(Fight.getRedTeam()));
|
||||
|
||||
@ -99,7 +99,7 @@ public class WinconditionRelativePercent extends Wincondition implements Printab
|
||||
return;
|
||||
|
||||
if(getPercent() >= Config.PercentWin){
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDer Schiff von " + team.getColoredName() + " §cwurde zu stark beschädigt!");
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cTeam " + team.getColoredName() + " §chat zu viel Schaden erlitten!");
|
||||
FightSystem.setSpectateState(Fight.getOpposite(team), "RelativePercent");
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
package de.steamwar.fightsystem.winconditions;
|
||||
|
||||
import de.steamwar.fightsystem.Config;
|
||||
import de.steamwar.fightsystem.FightSystem;
|
||||
import de.steamwar.fightsystem.countdown.Countdown;
|
||||
import de.steamwar.fightsystem.countdown.SWSound;
|
||||
import de.steamwar.fightsystem.fight.Fight;
|
||||
@ -49,7 +50,7 @@ public class WinconditionTimeTechKO extends Wincondition {
|
||||
* Works only for z-Axis fight direction for performance reasons
|
||||
*/
|
||||
public WinconditionTimeTechKO(){
|
||||
super("TechKO", "", " §chat den Gegner Tech K.O. gesetzt!");
|
||||
super("TechKO");
|
||||
|
||||
if(Config.BlueToRedZ > 0) {
|
||||
smallerZteam = Fight.getBlueTeam();
|
||||
@ -120,6 +121,7 @@ public class WinconditionTimeTechKO extends Wincondition {
|
||||
|
||||
@Override
|
||||
public void countdownFinished() {
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cTeam " + team.getColoredName() + " §chat zu lange nicht geschossen!");
|
||||
win(Fight.getOpposite(team));
|
||||
}
|
||||
}
|
||||
|
@ -20,20 +20,23 @@
|
||||
package de.steamwar.fightsystem.winconditions;
|
||||
|
||||
import de.steamwar.fightsystem.Config;
|
||||
import de.steamwar.fightsystem.FightSystem;
|
||||
import de.steamwar.fightsystem.countdown.TimeOverCountdown;
|
||||
import de.steamwar.fightsystem.states.FightState;
|
||||
import de.steamwar.fightsystem.states.StateDependentCountdown;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public class WinconditionTimeout extends Wincondition {
|
||||
|
||||
public WinconditionTimeout() {
|
||||
super("Timeout", "§cDie Zeit ist abgelaufen!");
|
||||
super("Timeout");
|
||||
if(Config.ActiveWinconditions.contains(Winconditions.TIMEOUT)){
|
||||
timeOverCountdown = new StateDependentCountdown(Winconditions.TIMEOUT, FightState.Running, new TimeOverCountdown(this::timeOver));
|
||||
}
|
||||
}
|
||||
|
||||
protected void timeOver() {
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cDie Zeit ist abgelaufen!");
|
||||
win(null);
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
package de.steamwar.fightsystem.winconditions;
|
||||
|
||||
import de.steamwar.fightsystem.Config;
|
||||
import de.steamwar.fightsystem.FightSystem;
|
||||
import de.steamwar.fightsystem.fight.Fight;
|
||||
import de.steamwar.fightsystem.fight.FightTeam;
|
||||
import de.steamwar.fightsystem.listener.WaterRemover;
|
||||
@ -38,7 +39,7 @@ public class WinconditionWaterTechKO extends Wincondition implements PrintableWi
|
||||
private final Map<FightTeam, TeamWater> teamMap = new HashMap<>();
|
||||
|
||||
public WinconditionWaterTechKO() {
|
||||
super("WaterTechKO", "§cDas Team ", " §chat den Gegner Tech K.O. gesetzt!");
|
||||
super("WaterTechKO");
|
||||
teamMap.put(Fight.getBlueTeam(), new TeamWater(Fight.getBlueTeam()));
|
||||
teamMap.put(Fight.getRedTeam(), new TeamWater(Fight.getRedTeam()));
|
||||
|
||||
@ -73,6 +74,7 @@ public class WinconditionWaterTechKO extends Wincondition implements PrintableWi
|
||||
});
|
||||
|
||||
if(water == 0){
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cTeam " + team.getColoredName() + " §cwurde Tech K.O. gesetzt!");
|
||||
win(Fight.getOpposite(team));
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren