JIAFALSEDREAM / KubeJS-based-anti-cheat

A JS script is used to deal with players who get illegal items in their normal state
MIT License
1 stars 1 forks source link

将该文件放入服务器的kubejs\server_scripts\文件夹下面报错PlayerEvents 没有被定义 #3

Closed weirenchao1994 closed 15 hours ago

weirenchao1994 commented 16 hours ago

以下为报错log [23:26:16] [ERR ] Error loading KubeJS script: ReferenceError: "PlayerEvents" is not defined. (server_scripts:anti-cheat.js#60) [23:26:16] [INFO ] Loaded block_break.js [23:26:16] [INFO ] Loaded script server_scripts:block_break.js in 0.001 s [23:26:16] [INFO ] Loaded gasmask_check.js [23:26:16] [INFO ] Loaded script server_scripts:gasmask_check.js in 0.001 s [23:26:16] [INFO ] Loaded health_check.js [23:26:16] [INFO ] Loaded script server_scripts:health_check.js in 0.0 s [23:26:16] [INFO ] Loaded inventory_check.js [23:26:16] [INFO ] Loaded script server_scripts:inventory_check.js in 0.001 s [23:26:16] [INFO ] Hello, World! (You will see this line every time server resources reload) [23:26:16] [INFO ] Loaded script server_scripts:script.js in 0.0 s [23:26:16] [INFO ] Loaded spawn_check.js [23:26:16] [INFO ] Loaded script server_scripts:spawn_check.js in 0.0 s [23:26:16] [INFO ] Loaded script server_scripts:spawn_commands.js in 0.001 s [23:26:16] [INFO ] Loaded 7/8 KubeJS server scripts in 0.01 s

JIAFALSEDREAM commented 16 hours ago

没道理啊 你是kjs6+的版本吗

weirenchao1994 commented 15 hours ago

kubejs-forge-1802.5.5-build.567.jar

JIAFALSEDREAM commented 15 hours ago

5.5版本 我这是6+的脚本 你可能得自己改改用onEvent了

JIAFALSEDREAM commented 15 hours ago

目前没有往下适配的计划 如果你修改了还能用欢迎pr到仓库

weirenchao1994 commented 14 hours ago

这是我改的,半桶水都没有,无法运行,如果可以的话,帮忙指正或者适配一下,非常感谢 https://dsm.wywen.cn/nas/sharing/mM8eKZMNR

JIAFALSEDREAM commented 2 hours ago

这是我改的,半桶水都没有,无法运行,如果可以的话,帮忙指正或者适配一下,非常感谢 https://dsm.wywen.cn/nas/sharing/mM8eKZMNR

我有空看看能不能搞个低版本的