SteamWar/FightSystem
Archiviert
13
1

Fix 1.18 WorldReset
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2022-04-09 23:28:04 +02:00
Ursprung 4867505899
Commit f0ecbbf427

Datei anzeigen

@ -32,6 +32,8 @@ import org.bukkit.WorldCreator;
import org.bukkit.entity.EntityType; import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import java.util.Objects;
public class FightWorld extends StateDependent { public class FightWorld extends StateDependent {
private static final boolean paper = Bukkit.getVersion().contains("git-Paper"); private static final boolean paper = Bukkit.getVersion().contains("git-Paper");
@ -63,7 +65,7 @@ public class FightWorld extends StateDependent {
} }
public static void resetWorld(){ public static void resetWorld(){
Recording.iterateOverEntities(entity -> true, entity -> { Recording.iterateOverEntities(Objects::nonNull, entity -> {
if(entity.getType() != EntityType.PLAYER && (!Config.ArenaLeaveable || Config.ArenaRegion.inRegion(entity.getLocation()))) if(entity.getType() != EntityType.PLAYER && (!Config.ArenaLeaveable || Config.ArenaRegion.inRegion(entity.getLocation())))
entity.remove(); entity.remove();
}); });