Skip to content

Commit

Permalink
♻️ commandPing -> commandPacketInternetGroper 防止与其他拓展重名
Browse files Browse the repository at this point in the history
  • Loading branch information
1024-byteeeee committed Feb 27, 2024
1 parent 60c8c9b commit e5d0425
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/club/mcams/carpet/AmsServerSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ public class AmsServerSettings {
options = {"0", "1", "2", "3", "4", "ops", "true", "false"},
categories = {AMS, COMMAND}
)
public static String commandPing = "false";
public static String commandPacketInternetGroper = "false";

@Rule(categories = {AMS, FEATURE, SURVIVAL})
public static boolean playerNoNetherPortalTeleport = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class pingCommandRegistry {
public static void register(CommandDispatcher<ServerCommandSource> dispatcher) {
dispatcher.register(
CommandManager.literal("ping")
.requires(source -> CommandHelper.canUseCommand(source, AmsServerSettings.commandPing))
.requires(source -> CommandHelper.canUseCommand(source, AmsServerSettings.commandPacketInternetGroper))
.then(argument("targetIpOrDomainName", StringArgumentType.string())
.then(argument("pingQuantity", IntegerArgumentType.integer())
.executes(context -> executePing(
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/carpetamsaddition/lang/en_us.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ carpetamsaddition:
desc: Designate one or more players as guides, granting them a glowing effect
extra:
'0': 'After enabling the rules, use the /leader help command to view the usage instructions'
commandPing:
commandPacketInternetGroper:
desc: player can use the "ping" command in the game
extra:
'0': 'After enabling the rules, use the /ping help command to view the usage instructions'
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/carpetamsaddition/lang/zh_cn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ carpetamsaddition:
desc: 指定一名或多名玩家成为导游,使他们拥有发光效果
extra:
'0': '开启规则后使用 /leader help 命令查看使用说明'
commandPing:
commandPacketInternetGroper:
name: ping命令
desc: 玩家可以在游戏中使用ping命令
extra:
Expand Down

0 comments on commit e5d0425

Please sign in to comment.