RefactoringVersionDependant #226
@ -279,23 +279,31 @@ public class FightTeam implements IFightTeam{
|
||||
|
||||
try {
|
||||
VersionedRunnable.call(new VersionedRunnable(() -> {
|
||||
try {
|
||||
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(() -> {
|
||||
try {
|
||||
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(() -> {
|
||||
try {
|
||||
EditSession e = FightTeam_14.pasteSchematic(schem, pasteX, pasteY, pasteZ, rotate);
|
||||
FightTeam_14.replaceTeamColor(e, c, cornerX, cornerY, cornerZ);
|
||||
}, 14));
|
||||
} catch (Schematic.WrongVersionException ex) {
|
||||
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");
|
||||
} catch (Schematic.WrongVersionException | IOException | NoClipboardException ex) {
|
||||
throw new SecurityException("Error pasting arena in schematic", ex);
|
||||
}
|
||||
}, 14));
|
||||
} catch (SecurityException securityException) {
|
||||
broadcast(FightSystem.PREFIX + "§cFehler beim Pasten der Schematic");
|
||||
throw securityException;
|
||||
}
|
||||
Bukkit.getScheduler().runTaskLater(FightSystem.getPlugin(), () -> HandlerList.unregisterAll(freezer), 3);
|
||||
Bukkit.getScheduler().runTaskLater(FightSystem.getPlugin(), this::teleportToSpawn,40);
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren