9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2026-01-06 15:52:03 +00:00

fix(core): 预防NPE

This commit is contained in:
jhqwqmc
2025-05-06 19:10:22 +08:00
parent 93d09c73ee
commit a7a706b680

View File

@@ -69,6 +69,7 @@ public class FastAsyncWorldEditDelegate extends AbstractDelegateExtent {
@Subscribe
@SuppressWarnings("unused")
public void onEditSessionEvent(EditSessionEvent event) {
if (event.getWorld() == null) return;
if (event.getStage() == EditSession.Stage.BEFORE_CHANGE) {
event.setExtent(new FastAsyncWorldEditDelegate(event));
} else if (event.getStage() == EditSession.Stage.BEFORE_HISTORY) {