【我的世界】公告栏(2024最新版教程)
微醺不及你
编辑于 2024年08月16日 00:41

《我的世界公告栏指令》

一、设置固定文字

/scoreboard objectives remove 信息栏

/scoreboard objectives add 信息栏 dummy "§l§4ᴍ§cɪ§6ɴ§eᴇ§aᴄ§bʀ§3ᴀ§dғ§uᴛ"

/scoreboard objectives setdisplay sidebar 信息栏 ascending

/scoreboard players set "§7----------------§r" 信息栏 -6

/scoreboard players set "§o§bঌ§l§f ɴᴏᴛɪᴄᴇ ɪɴғᴏ" 信息栏 -5

/scoreboard players set " §7[§b服主§7] xxx" 信息栏 -4

/scoreboard players set " §7[§a服号§7] xxx" 信息栏 -3

/scoreboard players set " §7[§d交流§7] xxx" 信息栏 -2

/scoreboard players set "§o§bঌ§l§f ᴏɴʟɪɴᴇ ɪɴғᴏ" 信息栏 -1

/scoreboard players set "§7----------------" 信息栏 999

二、检测数量

/scoreboard players set " §d●§7 在线人数" 信息栏 0

/execute as @a run scoreboard players add " §d●§7 在线人数" 信息栏 1

/scoreboard players set " §c●§7 实体数量" 信息栏 0

/execute as @e[type=!player,type=!item] run scoreboard players add " §c●§7 实体数量" 信息栏 1

/scoreboard players set " §a●§7 掉落物数" 信息栏 0

/execute as @e[type=item] run scoreboard players add " §a●§7 掉落物数" 信息栏 1

/scoreboard players set " §b●§7 在线OP数" 信息栏 0

/execute as @a[m=1] run scoreboard players add " §b●§7 在线OP数" 信息栏 1

三、定时清理倒计时与检测实体数量清理

/scoreboard players remove " §e●§7 定时清理" 信息栏 1

/execute if score " §e●§7 定时清理" 信息栏 matches 0 run tellraw @a {"rawtext":[{"text":"§a●§f〉 §7突然刮起了一阵强劲的龙卷风,把整个世界的掉落物都吹走了!"}]}

/execute if score " §e●§7 定时清理" 信息栏 matches 0 run playsound item.trident.riptide_3 @a

/execute if score " §e●§7 定时清理" 信息栏 matches 0 run kill @e[type=item]

/execute if score " §e●§7 定时清理" 信息栏 matches ..0 run scoreboard players set " §e●§7 定时清理" 信息栏 999

/execute if score " §c●§7 实体数量" 信息栏 matches 500.. run tellraw @a {"rawtext":[{"text":"§c●§f〉 检测到实体数量大于500,已将未被命名为§b『§f宠物§b』§f的生物清除§7(不包含玩家、NPC、盔甲架、画、我的伙伴、村民、僵尸村民、铁傀儡、雪傀儡、狼、猫、僵尸马、骷髅马、拴绳结、末影龙、末影水晶、矿车、漏斗矿车、运输矿车、三叉戟)"}]}

/execute if score " §c●§7 实体数量" 信息栏 matches 500.. run tp @e[type=!player,type=!npc,type=!armor_stand,type=!painting,type=!netease:pet,type=!villager,type=!zombie_villager,type=!iron_golem,type=!snow_golem,type=!wolf,type=!cat,type=!zombie_horse,type=!skeleton_horse,type=!leash_knot,type=!ender_dragon,type=!ender_crystal,type=!minecart,type=!hopper_minecart,type=!chest_minecart,type=!thrown_trident,name=!宠物] ~ -100 ~

四、在线奖励倒计时

/scoreboard players remove " §6●§7 在线奖励" 信息栏 1

/execute if score " §6●§7 在线奖励" 信息栏 matches 0 run tellraw @a {"rawtext":[{"text":"§6●§f〉§7 已发放 §n曲奇 §7* §f10"}]}

/execute if score " §6●§7 在线奖励" 信息栏 matches 0 run give @a cookie 10

/execute if score " §6●§7 在线奖励" 信息栏 matches 0 run playsound mob.chicken.plop @a

/execute if score " §6●§7 在线奖励" 信息栏 matches ..0 run scoreboard players set " §6●§7 在线奖励" 信息栏 999