Fix try/catch in FightTeam.pasteSchematic
Dieser Commit ist enthalten in:
Ursprung
623ee6c75a
Commit
042449e591
@ -279,22 +279,30 @@ public class FightTeam implements IFightTeam{
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
VersionedRunnable.call(new VersionedRunnable(() -> {
|
VersionedRunnable.call(new VersionedRunnable(() -> {
|
||||||
EditSession e = FightTeam_8.pasteSchematic(schem, pasteX, pasteY, pasteZ, rotate);
|
try {
|
||||||
FightTeam_8.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
|
EditSession e = FightTeam_8.pasteSchematic(schem, pasteX, pasteY, pasteZ, rotate);
|
||||||
|
FightTeam_8.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
|
||||||
|
} catch (Schematic.WrongVersionException | IOException | NoClipboardException ex) {
|
||||||
|
throw new SecurityException("Error pasting arena in schematic", ex);
|
||||||
|
}
|
||||||
}, 8), new VersionedRunnable(() -> {
|
}, 8), new VersionedRunnable(() -> {
|
||||||
EditSession e = FightTeam_8.pasteSchematic(schem, pasteX, pasteY, pasteZ, rotate);
|
try {
|
||||||
FightTeam_12.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
|
EditSession e = FightTeam_8.pasteSchematic(schem, pasteX, pasteY, pasteZ, rotate);
|
||||||
|
FightTeam_12.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
|
||||||
|
} catch (Schematic.WrongVersionException | IOException | NoClipboardException ex) {
|
||||||
|
throw new SecurityException("Error pasting arena in schematic", ex);
|
||||||
|
}
|
||||||
}, 12), new VersionedRunnable(() -> {
|
}, 12), new VersionedRunnable(() -> {
|
||||||
EditSession e = FightTeam_14.pasteSchematic(schem, pasteX, pasteY, pasteZ, rotate);
|
try {
|
||||||
FightTeam_14.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
|
EditSession e = FightTeam_14.pasteSchematic(schem, pasteX, pasteY, pasteZ, rotate);
|
||||||
|
FightTeam_14.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
|
||||||
|
} catch (Schematic.WrongVersionException | IOException | NoClipboardException ex) {
|
||||||
|
throw new SecurityException("Error pasting arena in schematic", ex);
|
||||||
|
}
|
||||||
}, 14));
|
}, 14));
|
||||||
} catch (Schematic.WrongVersionException ex) {
|
} catch (SecurityException securityException) {
|
||||||
broadcast(FightSystem.PREFIX + "§cDie gewählte Schematic kann nicht in dieser Version geladen werden");
|
|
||||||
HandlerList.unregisterAll(freezer);
|
|
||||||
return;
|
|
||||||
} catch (IOException | NoClipboardException ex) {
|
|
||||||
broadcast(FightSystem.PREFIX + "§cFehler beim Pasten der Schematic");
|
broadcast(FightSystem.PREFIX + "§cFehler beim Pasten der Schematic");
|
||||||
throw new SecurityException("Error pasting arena in schematic", ex);
|
throw securityException;
|
||||||
}
|
}
|
||||||
Bukkit.getScheduler().runTaskLater(FightSystem.getPlugin(), () -> HandlerList.unregisterAll(freezer), 3);
|
Bukkit.getScheduler().runTaskLater(FightSystem.getPlugin(), () -> HandlerList.unregisterAll(freezer), 3);
|
||||||
Bukkit.getScheduler().runTaskLater(FightSystem.getPlugin(), this::teleportToSpawn,40);
|
Bukkit.getScheduler().runTaskLater(FightSystem.getPlugin(), this::teleportToSpawn,40);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren