失落的钥匙
在服务器和客户端都需要安装(尽管如果仅在客户端或仅在服务器上安装,应该不会导致崩溃)
服务器端命令:
它添加了一个服务器端命令 /lost_keys:override <玩家> <绑定键> <钥匙>,该命令会临时替换给定绑定键对应的钥匙(直到玩家重新登录)。
例如,/lost_keys:override Steve key.forward key.keyboard.b 表示史蒂夫需要按 B 键来向前移动,而不是 W(或他们当前设置的按键)。
<key> 也可以设置为另一个绑定的值,因此 /lost_keys:override Steve key.drop key.forward 表示每当史蒂夫向前行走时,他们也会丢弃手中持有的物品。
要清除覆盖,请将 <key> 设置为 default(或自身);要禁用某个按键,请将 <key> 设置为 none(或任何无效的按键);要强制按下某个 <key>,请将其设置为 pressed。
<binding> 也可以是 all,用于一次性清除所有覆盖:/lost_keys:override <玩家> all default,禁用所有按键:/lost_keys:override <玩家> all none(然后可以通过将特定按键设置为自身来启用它们),或者造成混乱:/lost_keys:override <玩家> all key.keyboard.a
你也可以设置按键绑定来执行命令,例如:/lost_keys:bind_command <玩家> <按键> <命令>。注意命令中不包含 /,因此正确的写法是:/lost_keys:bind_command @s key.forward say hi。按键绑定也可以使用键盘上的按键。命令由客户端执行,因此需要 OP 权限的命令在未获得 OP 权限的玩家身上无法生效。
客户端命令:
它还会添加两个客户端命令 /lost_keys:lognext,该命令会告诉你下一个按下的按键的名称(以及其绑定的功能,如果有的话),以便你可以轻松确定如何覆盖你想要的操作。
以及 /lost_keys:list,它会显示所有已应用的覆盖设置
注意事项:
并非所有按键都能生效,因为 Minecraft 的行为并不一致,但移动和攻击等关键按键是可以的。同样,某些按键在与所有覆盖设置配合使用时可能无法正常工作
插件版本:
权限节点为 lost_keys.override,且仅对明确指定的玩家和 @a 生效——因此 /lost_keys:override Steve key.forward none 可以正常工作,但 /lost_keys:override @p key.forward none 或 /execute as Steve run lost_keys:override @s key.forward none 则不行!这是一个重要的区别!
/lost_keys:bind_command 同样适用这些限制,其权限节点为 lost_keys.bind_command
Lost Keys
required on both server and client (although it shouldnt crash anything if only client/only server has it)
Server Side Commands:
it adds a server side command /lost_keys:override <player> <binding> <key> that temporarily (until the player relogs) replaces the key for a given binding
for instance, /lost_keys:override Steve key.forward key.keyboard.b will mean Steve has to press B to walk forwards instead of W (or whatever they have it set to)
the <key> can also be set to whatever the value of another binding is, so /lost_keys:override Steve key.drop key.forward will mean whenever Steve walks forwards, they also drop whatever they're holding
to clear an override, set the <key> to default (or itself), to disable a key, set the <key> to none (or any invalid key), to force a <key> to be pressed, set it to pressed
the <binding> can also be all, which can be used to clear all overrides at once: /lost_keys:override <player> all default, disable all keys: /lost_keys:override <player> all none (then specific keys can be enabled by setting them to themselves) , or cause a mess: /lost_keys:override <player> all key.keyboard.a
you can also set keybindings to run commands, like so: /lost_keys:bind_command <player> <binding> <command>, the command does not include the /, so: /lost_keys:bind_command @s key.forward say hi, and the binding can also be keyboard keys. commands are run by the client, so commands that require op won't work on an unopped player
Client Side Commands:
it also adds two client side commands, /lost_keys:lognext, which tells you the name of the key you press next (and binding if there is one), so you can easily figure out how to override what you want
and /lost_keys:list, which tells you all applied overrides
Notes:
not all keys work, because minecraft is inconsistent, but all the important ones like movement and attacking do. Likewise some keys will not work properly with all overrides
Plugin Version:
the permission node is lost_keys.override, and it only works with specifically mentioned players and @a - so /lost_keys:override Steve key.forward none works, but /lost_keys:override @p key.forward none or /execute as Steve run lost_keys:override @s key.forward none do not! this is an important difference!
the same limitations apply for /lost_keys:bind_command, and it's permission node is lost_keys.bind_command
评论 0
登录后参与评分
还没有评论,来抢沙发吧