forked from SteamWar/SteamWar
Improve Flag.COLOR
This commit is contained in:
+2
-5
@@ -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 + "■"; // ■
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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<Region> 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);
|
||||
|
||||
Reference in New Issue
Block a user