Added try/catch tick
This commit is contained in:
@@ -12,6 +12,7 @@ import com.reider745.api.hooks.TypeHook;
|
|||||||
import com.reider745.api.hooks.annotation.Inject;
|
import com.reider745.api.hooks.annotation.Inject;
|
||||||
import com.reider745.api.hooks.annotation.Hooks;
|
import com.reider745.api.hooks.annotation.Hooks;
|
||||||
import com.reider745.entity.EntityMotion;
|
import com.reider745.entity.EntityMotion;
|
||||||
|
import com.zhekasmirnov.horizon.runtime.logger.Logger;
|
||||||
import com.zhekasmirnov.innercore.api.NativeCallback;
|
import com.zhekasmirnov.innercore.api.NativeCallback;
|
||||||
|
|
||||||
@Hooks(className = "cn.nukkit.Server")
|
@Hooks(className = "cn.nukkit.Server")
|
||||||
@@ -65,8 +66,17 @@ public class ServerHooks implements HookClass {
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public static void checkTickUpdates(Server server, int tick) {
|
public static void checkTickUpdates(Server server, int tick) {
|
||||||
EntityMotion.tick();
|
try {
|
||||||
NativeCallback.onTick();
|
try {
|
||||||
|
EntityMotion.tick();
|
||||||
|
NativeCallback.onTick();
|
||||||
|
} catch (Exception e) {
|
||||||
|
Logger.warning("IC-TICK", e.getCause());
|
||||||
|
}
|
||||||
|
}catch (Throwable e){
|
||||||
|
Logger.warning("IC-TICK", e);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|||||||
Reference in New Issue
Block a user