Merge pull request 'Fix prepare recoloring' (#276) from fixPrepare into master
Reviewed-on: #276 Reviewed-by: Chaoscaot <chaoscaot444@gmail.com>
Dieser Commit ist enthalten in:
Commit
a017df7caa
@ -118,7 +118,7 @@ public class FightSchematic extends StateDependent {
|
|||||||
|
|
||||||
private void paste(){
|
private void paste(){
|
||||||
FreezeWorld freezer = new FreezeWorld();
|
FreezeWorld freezer = new FreezeWorld();
|
||||||
DyeColor c = ColorConverter.chat2dye(team.getColor());
|
DyeColor c = ArenaMode.AntiPrepare.contains(Config.mode) ? ColorConverter.chat2dye(team.getColor()) : DyeColor.PINK;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
VersionedRunnable.call(new VersionedRunnable(() -> {
|
VersionedRunnable.call(new VersionedRunnable(() -> {
|
||||||
@ -126,25 +126,26 @@ public class FightSchematic extends StateDependent {
|
|||||||
FightTeam_8.replaceTeamColor(clipboard, c);
|
FightTeam_8.replaceTeamColor(clipboard, c);
|
||||||
FightTeam_8.pasteSchematic(clipboard, region, rotate);
|
FightTeam_8.pasteSchematic(clipboard, region, rotate);
|
||||||
} catch (NoClipboardException | WorldEditException ex) {
|
} catch (NoClipboardException | WorldEditException ex) {
|
||||||
throw new SecurityException("Error pasting arena in schematic", ex);
|
throw new SecurityException("Error pasting schematic", ex);
|
||||||
}
|
}
|
||||||
}, 8), new VersionedRunnable(() -> {
|
}, 8), new VersionedRunnable(() -> {
|
||||||
try {
|
try {
|
||||||
FightTeam_12.replaceTeamColor(clipboard, c);
|
FightTeam_12.replaceTeamColor(clipboard, c);
|
||||||
FightTeam_8.pasteSchematic(clipboard, region, rotate);
|
FightTeam_8.pasteSchematic(clipboard, region, rotate);
|
||||||
} catch (NoClipboardException | WorldEditException ex) {
|
} catch (NoClipboardException | WorldEditException ex) {
|
||||||
throw new SecurityException("Error pasting arena in schematic", ex);
|
throw new SecurityException("Error pasting schematic", ex);
|
||||||
}
|
}
|
||||||
}, 12), new VersionedRunnable(() -> {
|
}, 12), new VersionedRunnable(() -> {
|
||||||
try {
|
try {
|
||||||
FightTeam_14.replaceTeamColor(clipboard, c);
|
FightTeam_14.replaceTeamColor(clipboard, c);
|
||||||
FightTeam_14.pasteSchematic(clipboard, region, rotate);
|
FightTeam_14.pasteSchematic(clipboard, region, rotate);
|
||||||
} catch (NoClipboardException | WorldEditException ex) {
|
} catch (NoClipboardException | WorldEditException ex) {
|
||||||
throw new SecurityException("Error pasting arena in schematic", ex);
|
throw new SecurityException("Error pasting schematic", ex);
|
||||||
}
|
}
|
||||||
}, 14));
|
}, 14));
|
||||||
} catch (SecurityException securityException) {
|
} catch (SecurityException securityException) {
|
||||||
team.broadcast(FightSystem.PREFIX + "§cFehler beim Pasten der Schematic");
|
Bukkit.broadcastMessage(FightSystem.PREFIX + "§cFehler beim Pasten der Schematic");
|
||||||
|
Bukkit.getScheduler().runTask(FightSystem.getPlugin(), FightSystem::setPreSchemState);
|
||||||
throw securityException;
|
throw securityException;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren