mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2026-01-06 15:52:03 +00:00
修复EvtCraftEngineReload
This commit is contained in:
@@ -34,12 +34,15 @@ public class EvtCraftEngineReload extends SkriptEvent {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean check(Event event) {
|
public boolean check(Event event) {
|
||||||
if (event instanceof CraftEngineReloadEvent reloadEvent) return false;
|
if (!(event instanceof CraftEngineReloadEvent reloadEvent)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (onlyCheckFirstCall) {
|
if (onlyCheckFirstCall) {
|
||||||
if (hasBeenCalled) return false; // 如果 hasBeenCalled 已经为 true,代表已经调用过了, 故返回 false。
|
if (hasBeenCalled) return false; // 如果 hasBeenCalled 已经为 true,代表已经调用过了, 故返回 false。
|
||||||
hasBeenCalled = true;
|
hasBeenCalled = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
hasBeenCalled = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user