diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauScoreboard.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauScoreboard.java index dba69038..839c04c5 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauScoreboard.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/BauScoreboard.java @@ -119,11 +119,8 @@ public class BauScoreboard implements Listener { @Override public String getTitle() { Region region = Region.getRegion(player.getLocation()); - if (region.getType().isGlobal()) return "§eSteam§8War"; - String colorCode = "§e"; - if (region.getRegionData().has(Flag.COLOR).isReadable()) { - colorCode = "§" + region.getRegionData().get(Flag.COLOR).getWithDefault().getColorCode(); - } + if (region.getRegionData().has(Flag.COLOR).notVisibleInScoreboard()) return "§eSteam§8War"; + String colorCode = "§" + region.getRegionData().get(Flag.COLOR).getWithDefault().getColorCode(); return colorCode + "■ §eSteam§8War " + colorCode + "■"; // ■ } }); diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/BackupScheduler.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/BackupScheduler.java index bf31ba6c..d09b04a3 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/BackupScheduler.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/region/BackupScheduler.java @@ -28,6 +28,7 @@ import org.bukkit.scheduler.BukkitRunnable; import java.util.Iterator; import java.util.Optional; +import java.util.stream.Collectors; @Linked public class BackupScheduler implements Enable { @@ -43,6 +44,7 @@ public class BackupScheduler implements Enable { Iterator regionsToBackup = RegionSystem.INSTANCE.getRegions() .filter(region -> region.getRegionData().has(Flag.CHANGED).isReadable()) .filter(region -> region.getRegionData().get(Flag.CHANGED).isWithDefault(ChangedMode.HAS_CHANGE)) + .collect(Collectors.toList()) .iterator(); if (!regionsToBackup.hasNext()) return; doBackup(regionsToBackup);