本帖最后由 canglongbeta 于 2021-2-16 14:25 编辑
本人不会写mod,所以发了这个贴。
mod对应游戏版本1.12.2,Forge版本14.23.5.2855.
mod要求:使用gamemode、give、weather、time、MyCommands中的god、fly、night、day、sun、rain、repair、heal指令的玩家立即被kill
由于内容较为单一,所以设置50金粒,若实现困难可以加
本人不会写mod,所以发了这个贴。
mod对应游戏版本1.12.2,Forge版本14.23.5.2855.
mod要求:使用gamemode、give、weather、time、MyCommands中的god、fly、night、day、sun、rain、repair、heal指令的玩家立即被kill
由于内容较为单一,所以设置50金粒,若实现困难可以加
这不需要写模组。CrT 脚本。
复制代码
- import crafttweaker.event.CommandEvent;
- import crafttweaker.player.IPlayer;
- static bannedCommands as string[] = [
- "gamemode",
- "give",
- "weather",
- "time",
- "god",
- "fly",
- "night",
- "day",
- "sun",
- "rain",
- "repair",
- "heal"
- ];
- events.onCommand(function(event as CommandEvent) {
- if (event.commandSender instanceof IPlayer && bannedCommands has event.command.name) {
- val player as IPlayer = event.commandSender;
- player.attackEntityFrom(<damageSource:GENERIC>, 114514.0f);
- event.cancel();
- }
- });
canglongbeta 发表于 2021-2-16 15:12
请问如何使用?不会awa
安装 CraftTweaker,把这些内容复制进去,放进一个 zs 文件里,放到 .minecraft/scripts 里。
这个算是mod吗(我也不太了解),可以算是数据包吧(猜的,我觉得我猜错了)
youyihj 发表于 2021-2-16 16:11
安装 CraftTweaker,把这些内容复制进去,放进一个 zs 文件里,放到 .minecraft/scripts 里。 ...
zs文件弄不来

youyihj 发表于 2021-2-17 09:53
后缀名改成 zs。
无效。使用god和gamemode指令还活着
服务端插件轻松实现