Update the command format of the usage (including source code)

This commit is contained in:
BaiSugar 2022-04-27 10:14:24 +08:00 committed by memetrollsXD
parent fe26d8f995
commit 5a422ef5ff
3 changed files with 5 additions and 6 deletions

View File

@ -114,7 +114,7 @@ There is a dummy user named "Server" in every player's friends list that you can
| drop | drop <itemID\|itemName> [amount] | server.drop | Client only | Drops an item around you. | `d` `dropitem` |
| give | give [player] <itemId\|itemName> [amount] [level] | player.give | Both side | Gives item(s) to you or the specified player. | `g` `item` `giveitem` |
| givechar | givechar <uid> <avatarId> | player.givechar | Both side | Gives the player a specified character. | givec |
| giveall | giveall <uid> <amount> | player.giveall | Both side | Gives all items. | givea |
| giveall | giveall [uid] [amount] | player.giveall | Both side | Gives all items. | givea |
| godmode | godmode [uid] | player.godmode | Client only | Prevents you from taking damage. | |
| heal | heal | player.heal | Client only | Heals all characters in your current team. | h |
| help | help [command] | | Both side | Sends the help message or shows information about a specified command. | |

View File

@ -115,7 +115,7 @@ chmod +x gradlew
| drop | drop <物品ID\|物品名称> [数量] | server.drop | 仅客户端 | 在指定玩家周围掉落指定物品 | `d` `dropitem` |
| give | give [uid] <物品ID\|物品名称> [数量] [等级] | | | 给予指定玩家一定数量及等级的物品 | `g` `item` `giveitem` |
| givechar | givechar <uid> <角色ID> [等级] | player.givechar | 均可使用 | 给予指定玩家对应角色 | givec |
| giveall | giveall <uid> <数量> | player.giveall | 均可使用 | 给予指定玩家全部物品 | givea |
| giveall | giveall [uid] [数量] | player.giveall | 均可使用 | 给予指定玩家全部物品 | givea |
| godmode | godmode [uid] | player.godmode | 仅客户端 | 保护你不受到任何伤害(依然会被击退) | |
| heal | heal | player.heal | 仅客户端 | 治疗队伍中所有角色 | h |
| help | help [命令] | | 均可使用 | 显示帮助或展示指定命令的帮助 | |

View File

@ -13,7 +13,7 @@ import emu.grasscutter.game.player.Player;
import java.util.*;
@Command(label = "giveall", usage = "giveall [player] <amount>",
@Command(label = "giveall", usage = "giveall [player] [amount]",
description = "Gives all items", aliases = {"givea"}, permission = "player.giveall", threading = true)
public class GiveAllCommand implements CommandHandler {
@ -59,7 +59,7 @@ public class GiveAllCommand implements CommandHandler {
break;
default: // invalid
CommandHandler.sendMessage(null, "Usage: giveall [player] <amount>");
CommandHandler.sendMessage(null, "Usage: giveall [player] [amount]");
return;
}
@ -175,7 +175,6 @@ public class GiveAllCommand implements CommandHandler {
new Range(2017, 2029),
// new Range(108001, 108387) //food
};
private static final Integer[] testItemsIds = new Integer[] {
210, 211, 314, 315, 317, 1005, 1007, 1105, 1107, 1201, 1202, 2800,
100001, 100002, 100244, 100305, 100312, 100313, 101212, 11411, 11506, 11507, 11508, 12505,