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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user