mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Add null check to preloader
This commit is contained in:
parent
1ee4de0edf
commit
0ffab8ee69
@ -49,6 +49,7 @@ import com.fastasyncworldedit.core.math.LocalBlockVectorSet;
|
|||||||
import com.fastasyncworldedit.core.math.MutableBlockVector2;
|
import com.fastasyncworldedit.core.math.MutableBlockVector2;
|
||||||
import com.fastasyncworldedit.core.math.MutableBlockVector3;
|
import com.fastasyncworldedit.core.math.MutableBlockVector3;
|
||||||
import com.fastasyncworldedit.core.object.FaweLimit;
|
import com.fastasyncworldedit.core.object.FaweLimit;
|
||||||
|
import com.fastasyncworldedit.core.queue.implementation.preloader.Preloader;
|
||||||
import com.fastasyncworldedit.core.regions.RegionWrapper;
|
import com.fastasyncworldedit.core.regions.RegionWrapper;
|
||||||
import com.fastasyncworldedit.core.util.EditSessionBuilder;
|
import com.fastasyncworldedit.core.util.EditSessionBuilder;
|
||||||
import com.fastasyncworldedit.core.util.ExtentTraverser;
|
import com.fastasyncworldedit.core.util.ExtentTraverser;
|
||||||
@ -1253,7 +1254,10 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
|
|||||||
}
|
}
|
||||||
// Cancel any preloader associated with the actor if present
|
// Cancel any preloader associated with the actor if present
|
||||||
if (getPlayer() != null) {
|
if (getPlayer() != null) {
|
||||||
Fawe.imp().getPreloader(false).cancel(getPlayer());
|
Preloader preloader = Fawe.imp().getPreloader(false);
|
||||||
|
if (preloader != null) {
|
||||||
|
preloader.cancel(getPlayer());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Enqueue it
|
// Enqueue it
|
||||||
if (getChangeSet() != null) {
|
if (getChangeSet() != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user