Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-05 11:00:05 +01:00
Added OperationHelper.completeBlindly().
Dieser Commit ist enthalten in:
Ursprung
45c2868d4c
Commit
2562a2f577
@ -61,4 +61,21 @@ public final class OperationHelper {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Complete a given operation synchronously until it completes. Re-throw all
|
||||
* {@link com.sk89q.worldedit.WorldEditException} exceptions as
|
||||
* {@link java.lang.RuntimeException}s.
|
||||
*
|
||||
* @param op operation to execute
|
||||
*/
|
||||
public static void completeBlindly(Operation op) {
|
||||
while (op != null) {
|
||||
try {
|
||||
op = op.resume();
|
||||
} catch (WorldEditException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren