mirror of
https://github.com/xzb23/Minecraft-Command-Permission-Control.git
synced 2026-11-22 08:44:36 +08:00
可以通过配置文件仅禁用特定命令的特定参数了
This commit is contained in:
2 files changed
+58
-27
No files matched your search
@@ -22,9 +22,13 @@ public class Config {
|
||||
.defineInRange("version", 1, 0, Integer.MAX_VALUE);
|
||||
|
||||
|
||||
public static final ModConfigSpec.ConfigValue<List<? extends String>> BLOCKED_COMMANDS = BUILDER
|
||||
public static final ModConfigSpec.ConfigValue<List<? extends String>> BLOCKLIST = BUILDER
|
||||
.comment("禁用的指令列表")
|
||||
.defineList("blocked_commands", List.of("give", "fill"), obj -> obj instanceof String);
|
||||
.comment("格式为{cmd/指令}:{checkIndex/禁用第几个参数}:{arg1[,arg2,...]/禁用的参数1[,禁用的参数2,...]}")
|
||||
.comment("其中{checkIndex}填0代表禁用整个指令")
|
||||
.defineList("blocked_commands", List.of("give:0:", "fill:0:", "gamemode:1:creative"), obj -> obj instanceof String);
|
||||
|
||||
|
||||
|
||||
|
||||
public static final ModConfigSpec.ConfigValue<String> BROADCASTMSG = BUILDER
|
||||
|
||||
Reference in new issue
Block a user