3
0
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:
sk89q 2014-03-26 23:10:12 -07:00 committet von TomyLobo
Ursprung 45c2868d4c
Commit 2562a2f577

Datei anzeigen

@ -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);
}
}
}
}