跳到正文

Register Event Commands

作者:notstabledev

Assign commands to run at server start, player join, and player first join [FABRIC]

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

This is a simple fabric mod that as created mainly to allow you to make commands run when your server starts up. It allows you to setup commands to run on three events:

On server startup

On player join

On player join for first time

 

This is a server side only mod meaning if you put this on your server, none of your players need to download it also

**REQUIRES FABRIC API**

 

The command syntax is /registerCommand <event> (add|remove) “<command>”

there is also /registerCommand <event> list

 

If you make a command for player join / player join for first time and want to execute a command using that players name use @j or @join in place of a player name or in place of @p /@s types. If u put :p: :name: :playername: or :player: in a join command it will be replaced with a with the players name in text format.

 

YOU MUST PUT THE <command> IN QOTATIONS (see examples below). There is no command autocomplete suggestions when you are registering a command, the best practice is just to type out the command before hand then ctrl/cmd a and copy then type /registerCommand <event> (add|remove) “paste command here”

 

Example:

 

/registerCommand onPlayerJoin add “/give @j diamond 1”

This will give a player 1 diamond each time they join

 

/registerCommand onPlayerFirstJoin add “tellraw @a {“text”:”Welcome to the server :name:”,”bold”:true,”italic”:true,”color”:”yellow”}”

This will add a custom message that will run the first time a player joins and welcome them by name

 

/registerCommand onStart add “say server started”

will run /say server started right when the server starts

 

 

 

All commands that are added are stored in config/CommandRunner.json and you can edit/remove commands there if you would prefer

常见问题

Register Event Commands 支持哪些 Minecraft 版本?

Register Event Commands 支持 Minecraft Java 版 1.18–1.18.1,共 2 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。

Register Event Commands 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分