Hotfix MissileWars challenge better play on
Dieser Commit ist enthalten in:
Ursprung
3da00917a0
Commit
7adab45476
@ -31,9 +31,15 @@ import org.bukkit.Bukkit;
|
|||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class MissileWars extends JavaPlugin {
|
public class MissileWars extends JavaPlugin {
|
||||||
private static MissileWars plugin;
|
private static MissileWars plugin;
|
||||||
private static MWTeam redTeam; //red has South side -> spawns missles towards north
|
private static MWTeam redTeam; //red has South side -> spawns missles towards north
|
||||||
@ -93,8 +99,11 @@ public class MissileWars extends JavaPlugin {
|
|||||||
fightState = FightState.WAITING;
|
fightState = FightState.WAITING;
|
||||||
StateDependent.setupState(fightState);
|
StateDependent.setupState(fightState);
|
||||||
|
|
||||||
|
Set<UUID> uuidList = Bukkit.getOnlinePlayers().stream().map(Entity::getUniqueId).collect(Collectors.toSet());
|
||||||
|
if (!uuidList.contains(Config.RedLeader) || !uuidList.contains(Config.BlueLeader)) {
|
||||||
Config.RedLeader = null;
|
Config.RedLeader = null;
|
||||||
Config.BlueLeader = null;
|
Config.BlueLeader = null;
|
||||||
|
}
|
||||||
|
|
||||||
redTeam.reset();
|
redTeam.reset();
|
||||||
blueTeam.reset();
|
blueTeam.reset();
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren