Simplify ItemCountdown
Dieser Commit ist enthalten in:
Ursprung
5d879beaa4
Commit
388323e6b0
@ -77,7 +77,8 @@ public class MWTeam {
|
||||
return spawn;
|
||||
}
|
||||
|
||||
public void join (Player p) {
|
||||
@SuppressWarnings("java:S1874")
|
||||
public void join(Player p) {
|
||||
players.add(p);
|
||||
p.teleport(spawn);
|
||||
p.setGameMode(GameMode.SURVIVAL);
|
||||
@ -87,11 +88,10 @@ public class MWTeam {
|
||||
if (MissileWars.getFightState() == FightState.WAITING && !enemy().getPlayers().isEmpty())
|
||||
MissileWars.startRound();
|
||||
}
|
||||
|
||||
public void leave (Player p) {
|
||||
if(!players.contains(p))
|
||||
return;
|
||||
|
||||
@SuppressWarnings("java:S1874")
|
||||
public void leave(Player p) {
|
||||
if(!players.contains(p)) return;
|
||||
players.remove(p);
|
||||
sbteam.removePlayer(p);
|
||||
if (players.isEmpty() && MissileWars.getFightState() == FightState.FIGHTING)
|
||||
|
@ -20,7 +20,6 @@
|
||||
package de.steamwar.misslewars.countdowns;
|
||||
|
||||
import de.steamwar.misslewars.*;
|
||||
import de.steamwar.misslewars.items.Missile;
|
||||
import de.steamwar.misslewars.items.SpecialItem;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
@ -29,7 +28,10 @@ import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
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 {
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren