9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-30 20:39:10 +00:00

修复EvtCraftEngineReload

This commit is contained in:
Catnies
2025-08-08 14:28:01 +08:00
parent 44f8c88946
commit 82e4e3ddd5

View File

@@ -34,12 +34,15 @@ public class EvtCraftEngineReload extends SkriptEvent {
@Override
public boolean check(Event event) {
if (event instanceof CraftEngineReloadEvent reloadEvent) return false;
if (!(event instanceof CraftEngineReloadEvent reloadEvent)) {
return false;
}
if (onlyCheckFirstCall) {
if (hasBeenCalled) return false; // 如果 hasBeenCalled 已经为 true代表已经调用过了, 故返回 false。
hasBeenCalled = true;
return true;
}
hasBeenCalled = true;
return true;
}