@@ -17,7 +17,6 @@ import com.noxcrew.interfaces.utilities.CollapsablePaneMap
17
17
import com.noxcrew.interfaces.utilities.InterfacesCoroutineDetails
18
18
import com.noxcrew.interfaces.utilities.forEachInGrid
19
19
import kotlinx.coroutines.Job
20
- import kotlinx.coroutines.async
21
20
import kotlinx.coroutines.launch
22
21
import kotlinx.coroutines.sync.Mutex
23
22
import kotlinx.coroutines.withTimeout
@@ -257,7 +256,7 @@ public abstract class AbstractInterfaceView<I : InterfacesInventory, T : Interfa
257
256
258
257
// Start the job if it's not running currently!
259
258
if (transformingJob == null || transformingJob?.isCompleted == true ) {
260
- transformingJob = SCOPE .async (
259
+ transformingJob = SCOPE .launch (
261
260
InterfacesCoroutineDetails (player.uniqueId, " running and applying a transform" )
262
261
) {
263
262
// Go through all pending transforms one at a time until
@@ -267,15 +266,11 @@ public abstract class AbstractInterfaceView<I : InterfacesInventory, T : Interfa
267
266
// Removes the first pending transform
268
267
val transform = pendingTransforms.remove()
269
268
270
- try {
271
- // Don't run transforms for an offline player!
272
- if (! Bukkit .isStopping() && player.isOnline) {
273
- withTimeout(6 .seconds) {
274
- runTransformAndApplyToPanes(transform)
275
- }
269
+ // Don't run transforms for an offline player!
270
+ if (! Bukkit .isStopping() && player.isOnline) {
271
+ withTimeout(6 .seconds) {
272
+ runTransformAndApplyToPanes(transform)
276
273
}
277
- } catch (exception: Exception ) {
278
- logger.error(" Failed to run and apply transform: $transform " , exception)
279
274
}
280
275
}
281
276
0 commit comments