Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit 50dcb91

Browse files
committed
[Fix] Change var to low case
1. Because mcfunction is strict on variables, it needs to be case sensitive to avoid variable errors 2. Change announce message 3. Change time delay from 100 to 50, from 200 to 100
1 parent 9062ab2 commit 50dcb91

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# 创建两个计分板检测退出次数和在线时间
22
scoreboard objectives add logout minecraft.custom:leave_game
3-
scoreboard objectives add Online minecraft.custom:play_one_minute
3+
scoreboard objectives add online minecraft.custom:play_one_minute
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# 在线时间为 100 后显示通知
2-
execute as @a[scores={Online=100}] at @s run tellraw @s [{"text":"欢迎来到RUA服务器,这使你充满了决心","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"clickEvent":{"action":"open_url","value":"https://ruabbs.com"},"hoverEvent":{"action":"show_text","value":"点击此处打开 RUA 论坛"}}]
3-
# 设置在线时间为 200 避免多次显示
4-
execute as @a[scores={Online=100}] at @s run scoreboard players set @s Online 200
1+
# 在线时间为 50 后显示通知
2+
execute as @a[scores={online=50}] at @s run tellraw @s [{"text":"欢迎来到rua服务器, ","color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"点我进入论坛","color":"aqua","bold":false,"italic":false,"underlined":true,"strikethrough":false,"obfuscated":false,"clickEvent":{"action":"open_url","value":"https://ruabbs.com"}}]
3+
# 设置在线时间为 100 避免多次显示
4+
execute as @a[scores={online=50}] at @s run scoreboard players set @s online 100
55

6-
# 在线时间为 100 或更大,并且退出过一次或更多次服务器,则显示通知
7-
execute as @a[scores={Online=100.., Logout=1..}] at @s run tellraw @s [{"text":"欢迎来到RUA服务器,这使你充满了决心","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"clickEvent":{"action":"open_url","value":"https://ruabbs.com"},"hoverEvent":{"action":"show_text","value":"点击此处打开 RUA 论坛"}}]
8-
# 重置退出次数为 0,所以为什么要设置退出一次或更多啊233
9-
execute as @a[scores={Online=100.., Logout=1..}] at @s run scoreboard players set @s Logout 0
6+
# 在线时间为 50 或更大,并且退出过一次或更多次服务器,则显示通知
7+
execute as @a[scores={logout=1}] at @s run tellraw @s [{"text":"欢迎来到rua服务器, ","color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"点我进入论坛","color":"aqua","bold":false,"italic":false,"underlined":true,"strikethrough":false,"obfuscated":false,"clickEvent":{"action":"open_url","value":"https://ruabbs.com"}}]
8+
# 重置退出次数为 0
9+
execute as @a[scores={logout=1}] at @s run scoreboard players reset @s logout
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# 删除 Logout 和 online 两个计分板
2-
scoreboard objectives remove Logout
3-
scoreboard objectives remove Online
2+
scoreboard objectives remove logout
3+
scoreboard objectives remove online

0 commit comments

Comments
 (0)