-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathKitFox-ServerInfo.sk
26 lines (24 loc) · 1.16 KB
/
KitFox-ServerInfo.sk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# KitFox-ServerInfo.sk
# 依赖:
# KitFox-CORE.sk
# skript-placeholders 1.5
#
# 本skript由SwallowMC团队编写并由SinanGentoo主要维护;
# 如果你在使用本脚本时遇到了问题,请联系我们或者在我们的Github
# 仓库里发issue或pr!
# --------------------------------------------
function FOX_SI_linkText(textCollection: objects) :: text:
set {_result} to ""
loop {_textCollection::*}:
set {_result} to "%{_result}%%loop-value%"
return "%{_result}%"
on server start:
FOX_registerCommand("info","FOX_SERVERINFO","获取服务器状态")
function FOX_SERVERINFO(type: text, groupcode: text, peoplecode: text, content: text):
set {_infotext::0} to "服务器正常运行中!%nl%"
set {_infotext::1} to "在线玩家:%placeholder ""playerlist_online,normal,yes,list""%%nl%"
set {_infotext::2} to "服务器人数:%placeholder ""server_online""%/%placeholder ""server_max_players""%%nl%"
set {_infotext::3} to "服务器已用内存:%placeholder ""server_ram_used""%M%nl%"
set {_infotext::4} to "服务器TPS:%tps%"
set {_result} to FOX_SI_linkText({_infotext::*})
FOX_sendMessage("group","%{_groupcode}%","%{_result}%")