SteamWar/FightSystem
Archiviert
13
1

Fix prepare recoloring #276

Manuell gemergt
Lixfel hat 2 Commits von fixPrepare nach master 2021-05-24 09:56:43 +02:00 zusammengeführt
Nur Änderungen aus Commit 5945f3c148 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -118,7 +118,7 @@ public class FightSchematic extends StateDependent {
private void paste(){
FreezeWorld freezer = new FreezeWorld();
DyeColor c = ColorConverter.chat2dye(team.getColor());
DyeColor c = ArenaMode.AntiPrepare.contains(Config.mode) ? ColorConverter.chat2dye(team.getColor()) : DyeColor.PINK;
try {
VersionedRunnable.call(new VersionedRunnable(() -> {
@ -126,25 +126,25 @@ public class FightSchematic extends StateDependent {
FightTeam_8.replaceTeamColor(clipboard, c);
FightTeam_8.pasteSchematic(clipboard, region, rotate);
} catch (NoClipboardException | WorldEditException ex) {
throw new SecurityException("Error pasting arena in schematic", ex);
throw new SecurityException("Error pasting schematic", ex);
}
}, 8), new VersionedRunnable(() -> {
try {
FightTeam_12.replaceTeamColor(clipboard, c);
FightTeam_8.pasteSchematic(clipboard, region, rotate);
} catch (NoClipboardException | WorldEditException ex) {
throw new SecurityException("Error pasting arena in schematic", ex);
throw new SecurityException("Error pasting schematic", ex);
}
}, 12), new VersionedRunnable(() -> {
try {
FightTeam_14.replaceTeamColor(clipboard, c);
FightTeam_14.pasteSchematic(clipboard, region, rotate);
} catch (NoClipboardException | WorldEditException ex) {
throw new SecurityException("Error pasting arena in schematic", ex);
throw new SecurityException("Error pasting schematic", ex);
}
}, 14));
} catch (SecurityException securityException) {
team.broadcast(FightSystem.PREFIX + "§cFehler beim Pasten der Schematic");
FightSystem.shutdown(FightSystem.PREFIX + "§cFehler beim Pasten der Schematic");
throw securityException;
}