愚人节演示
在愚人节加入服务器时显示 Minecraft 的试玩版界面。
支持的版本
该插件理论上适用于 1.7.10 到 1.21 之间的所有版本。不过,我仅在 Paper 1.21.11 以及相同版本的客户端上进行了测试。
工作原理
你可以通过 Game Event 数据包触发多种演示消息。值 0 会显示此屏幕,而值 101 至 104 会在聊天栏中显示游戏操作说明(例如如何移动、截图等)。更多信息请查看 Minecraft wiki。
本插件使用 packetevents 向玩家发送数据包。它已包含在最终的 JAR 文件中。
修改文本
如果你觉得向用户展示这些内容可能会造成误导,那么你绝对不是第一个这么想的人。不过,试玩版界面的文本像游戏中几乎任何其他文本一样,可以通过资源包进行修改。因此,你可以使用资源包更改以下键值,并在玩家加入服务器之前将其发送给玩家:
{
"demo.help.buy": "立即购买!",
"demo.help.fullWrapped": "本次试玩将持续 5 个游戏日(约 1 小时 40 分钟现实时间)。请查看进度以获取提示!玩得开心!",
"demo.help.inventory": "按 %1$s 键打开物品栏",
"demo.help.jump": "按 %1$s 键跳跃",
"demo.help.later": "继续游玩!",
"demo.help.movementMouse": "使用鼠标环顾四周",
"demo.help.movementShort": "按 %1$s、%2$s、%3$s、%4$s 键移动",
"demo.help.title": "Minecraft 试玩模式"
}
April Fools Demo
Shows the Minecraft demo screen when joining a server on April Fools.
Supported versions
This plugin should technically work on all versions between 1.7.10 and 1.21. However, I have only tested it on Paper 1.21.11 with a client of the same version.
How it works
You can trigger several demo messages through a Game Event packet. Value 0 shows this screen, and values 101 through 104 show instructions on how to play the game (i.e. how to move, take a screenshot, among others) in the chat. For more information, check out the Minecraft wiki.
This plugin uses packetevents to send packets to the player. It is already included in the final JAR file.
Changing the text
If you think showing this to users could be somewhat misleading, you're definitely not the first one. However, the demo screen text, like pretty much any other piece of text in the game, can be modified using a resource pack. As such, you can change the following keys using a resource pack and send it to players before they join the server:
{
"demo.help.buy": "Purchase Now!",
"demo.help.fullWrapped": "This demo will last 5 in-game days (about 1 hour and 40 minutes of real time). Check the advancements for hints! Have fun!",
"demo.help.inventory": "Use the %1$s key to open your inventory",
"demo.help.jump": "Jump by pressing the %1$s key",
"demo.help.later": "Continue Playing!",
"demo.help.movementMouse": "Look around using the mouse",
"demo.help.movementShort": "Move by pressing the %1$s, %2$s, %3$s, %4$s keys",
"demo.help.title": "Minecraft Demo Mode"
}
评论 0
登录后参与评分
还没有评论,来抢沙发吧