SteamWar/MissileWars
Archiviert
13
0

Simplify ItemCountdown

Dieser Commit ist enthalten in:
jojo 2020-09-19 14:36:03 +02:00
Ursprung 5d879beaa4
Commit 388323e6b0
2 geänderte Dateien mit 9 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -77,6 +77,7 @@ public class MWTeam {
return spawn; return spawn;
} }
@SuppressWarnings("java:S1874")
public void join(Player p) { public void join(Player p) {
players.add(p); players.add(p);
p.teleport(spawn); p.teleport(spawn);
@ -88,10 +89,9 @@ public class MWTeam {
MissileWars.startRound(); MissileWars.startRound();
} }
@SuppressWarnings("java:S1874")
public void leave(Player p) { public void leave(Player p) {
if(!players.contains(p)) if(!players.contains(p)) return;
return;
players.remove(p); players.remove(p);
sbteam.removePlayer(p); sbteam.removePlayer(p);
if (players.isEmpty() && MissileWars.getFightState() == FightState.FIGHTING) if (players.isEmpty() && MissileWars.getFightState() == FightState.FIGHTING)

Datei anzeigen

@ -20,7 +20,6 @@
package de.steamwar.misslewars.countdowns; package de.steamwar.misslewars.countdowns;
import de.steamwar.misslewars.*; import de.steamwar.misslewars.*;
import de.steamwar.misslewars.items.Missile;
import de.steamwar.misslewars.items.SpecialItem; import de.steamwar.misslewars.items.SpecialItem;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Material; import org.bukkit.Material;
@ -29,7 +28,10 @@ import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.scheduler.BukkitTask; import org.bukkit.scheduler.BukkitTask;
import java.util.*; import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
import java.util.Random;
public class ItemCountdown extends StateDependent { public class ItemCountdown extends StateDependent {