File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,15 +50,15 @@ chatFormat:
5050 from_game : " <{name}> {msg}" # 服内消息转发到群内时的文本
5151 from_group : " 群:<{nick}> {msg}" # 群内消息转发到服内时的文本
5252 post_chat : true # 是否在群内发送消息到服务器内
53- post_prefix : " " # 群内消息转发到服内时的前缀
53+ post_prefix : " " # 服内消息转发到群内时的前缀
5454# MOTD服务器地址
5555# 格式: 地址:端口 (示例: play.easecation.net:19132)
5656motdUrl : play.easecation.net:19132
5757# 服务器显示名称
5858serverName : AllayMC
5959# 自定义命令列表
6060customCommand :
61- - key : " 加白名" # 执行关键词,可使用"/执行 关键词 参数1 参数2"来执行自定义命令
61+ - key : " 加白名" # 执行关键词,可使用"/关键词 参数1 参数2"来执行自定义命令
6262 command : " whitelist add &1" # &1为参数占位符,第一个参数为&1,第二个&2,以此类推
6363 permission : 0 # 0是普通权限,大于0则为管理员权限
6464 - key : 管理加白名
@@ -81,7 +81,7 @@ customCommand:
8181
8282``` yaml
8383customCommand :
84- - key : " 加白名" # 执行关键词,可使用"/执行 关键词 参数1 参数2"来执行自定义命令
84+ - key : " 加白名" # 执行关键词,可使用"/关键词 参数1 参数2"来执行自定义命令
8585 command : " whitelist add &1" # &1为参数占位符,第一个参数为&1,第二个&2,以此类推
8686 permission : 0 # 0是普通权限,大于0则为管理员权限
8787` ` `
Original file line number Diff line number Diff line change 3939 " game" : " <{name}> {msg}" , // 服内消息转发到群内时的文本
4040 " group" : " 群:<{nick}> {msg}" , // 群内消息转发到服内时的文本
4141 " post_chat" : true , // 是否在群内发送消息到服务器内
42- " post_prefix" : " " // 群内消息转发到服内时的前缀
42+ " post_prefix" : " " // 服内消息转发到群内时的前缀
4343 },
4444 " customCommand" : [ // 见下文 "配置自定义命令"
4545 {
8080 " customCommand" : [
8181 {
8282 " command" : " whitelist add &1" , // &1为参数占位符,第一个参数为&1,第二个&2,以此类推
83- " key" : " 加白名" , // 执行关键词,可使用"/执行 关键词 参数1 参数2"来执行自定义命令
83+ " key" : " 加白名" , // 执行关键词,可使用"/关键词 参数1 参数2"来执行自定义命令
8484 " permission" : 0 // 0是普通权限,大于0则为管理员权限
8585 }
8686 ]
Original file line number Diff line number Diff line change 4242 " game" : " <{name}> {msg}" , // 服内消息转发到群内时的文本
4343 " group" : " 群:<{nick}> {msg}" , // 群内消息转发到服内时的文本
4444 " post_chat" : true , // 是否在群内发送消息到服务器内
45- " post_prefix" : " " // 群内消息转发到服内时的前缀
45+ " post_prefix" : " " // 服内消息转发到群内时的前缀
4646 },
4747 " motd" : {
4848 " server_ip" : " play.easecation.net" , // 使用/查在线的时候显示的图片地址(改成你自己的进服IP)
5454 },
5555 " customCommand" : [
5656 {
57- " key" : " 加白名" , // 执行关键词,可使用"/执行 关键词 参数1 参数2"来执行自定义命令
57+ " key" : " 加白名" , // 执行关键词,可使用"/关键词 参数1 参数2"来执行自定义命令
5858 " command" : " whitelist add &1" , // &1为参数占位符,第一个参数为&1,第二个&2,以此类推
5959 " permission" : 0 // 0是普通权限,大于0则为管理员权限
6060 },
8585{
8686 " customCommand" : [
8787 {
88- " key" : " 加白名" , // 执行关键词,可使用"/执行 关键词 参数1 参数2"来执行自定义命令
88+ " key" : " 加白名" , // 执行关键词,可使用"/关键词 参数1 参数2"来执行自定义命令
8989 " command" : " whitelist add &1" , // &1为参数占位符,第一个参数为&1,第二个&2,以此类推
9090 " permission" : 0 // 0是普通权限,大于0则为管理员权限
9191 },
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ chatFormat:
5656 from_game : " <{name}> {msg}" # 服内消息转发到群内时的文本
5757 from_group : " 群:<{nick}> {msg}" # 群内消息转发到服内时的文本
5858 post_chat : true # 是否在群内发送消息到服务器内
59- post_prefix : " " # 群内消息转发到服内时的前缀
59+ post_prefix : " " # 服内消息转发到群内时的前缀
6060
6161motd :
6262 server_ip : " play.easecation.net" # 使用"/查在线"时的Motd图片地址(改成你的进服地址)
6868
6969# 自定义执行命令
7070customCommand :
71- - key : " 加白名" # 执行关键词,可使用"/执行 关键词 参数1 参数2"来执行自定义命令
71+ - key : " 加白名" # 执行关键词,可使用"/关键词 参数1 参数2"来执行自定义命令
7272 command : " whitelist add &1" # &1为参数占位符,第一个参数为&1,第二个&2,以此类推
7373 permission : 0 # 0是普通权限,大于0则为管理员权限
7474
@@ -94,7 +94,7 @@ customCommand:
9494
9595``` yaml
9696customCommand :
97- - key : " 加白名" # 执行关键词,可使用"/执行 关键词 参数1 参数2"来执行自定义命令
97+ - key : " 加白名" # 执行关键词,可使用"/关键词 参数1 参数2"来执行自定义命令
9898 command : " whitelist add &1" # &1为参数占位符,第一个参数为&1,第二个&2,以此类推
9999 permission : 0 # 0是普通权限,大于0则为管理员权限
100100
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ chatFormat:
5252 from_game : " <{name}> {msg}" # 服内消息转发到群内时的文本
5353 from_group : " 群:<{nick}> {msg}" # 群内消息转发到服内时的文本
5454 post_chat : true # 是否在群内发送消息到服务器内
55- post_prefix : " " # 群内消息转发到服内时的前缀
55+ post_prefix : " " # 服内消息转发到群内时的前缀
5656
5757motd :
5858 server_ip : " play.hypixel.net" # 使用"/查在线"时的Motd图片地址(改成你的进服地址)
@@ -68,7 +68,7 @@ whiteList:
6868
6969# 自定义执行命令
7070customCommand :
71- - key : " 加白名" # 执行关键词,可使用"/执行 关键词 参数1 参数2"来执行自定义命令
71+ - key : " 加白名" # 执行关键词,可使用"/关键词 参数1 参数2"来执行自定义命令
7272 command : " whitelist add &1" # &1为参数占位符,第一个参数为&1,第二个&2,以此类推
7373 permission : 0 # 0是普通权限,大于0则为管理员权限
7474
@@ -93,7 +93,7 @@ customCommand:
9393
9494``` yaml
9595customCommand :
96- - key : " 加白名" # 执行关键词,可使用"/执行 关键词 参数1 参数2"来执行自定义命令
96+ - key : " 加白名" # 执行关键词,可使用"/关键词 参数1 参数2"来执行自定义命令
9797 command : " whitelist add &1" # &1为参数占位符,第一个参数为&1,第二个&2,以此类推
9898 permission : 0 # 0是普通权限,大于0则为管理员权限
9999
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ public class MyEventHandle {
9292
9393#### 5.1 发送测试命令
9494
95- 在群内发送消息 ` @HuHoBot /执行 关键词 ` 查看是否正确触发监听器。
95+ 在群内发送消息 ` @HuHoBot /关键词 ` 查看是否正确触发监听器。
9696
9797### 6. 注意事项
9898
Original file line number Diff line number Diff line change @@ -40,6 +40,12 @@ mc.listen("onServerStarted",()=>{
4040})
4141```
4242
43+ ### 测试自定义命令
44+
45+ #### 发送测试命令
46+
47+ 在群内发送消息 ` @HuHoBot /关键词 ` 查看是否正确触发监听器。
48+
4349### 附录:事件说明
4450- 详见[ 事件] ( Events.md )
4551
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ public final class HuHoBotExample extends JavaPlugin implements Listener {
120120
121121#### 5.1 发送测试命令
122122
123- 在群内发送消息 ` @HuHoBot /执行 关键词 ` 查看是否正确触发监听器。
123+ 在群内发送消息 ` @HuHoBot /关键词 ` 查看是否正确触发监听器。
124124
125125### 6. 注意事项
126126
You can’t perform that action at this time.
0 commit comments