Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
02e737e9
Commit
02e737e9
authored
May 28, 2022
by
tester233
Committed by
Melledy
May 28, 2022
Browse files
Complement usage
parent
68e1c8d7
Changes
11
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/command/commands/ChangeSceneCommand.java
View file @
02e737e9
...
@@ -8,7 +8,7 @@ import java.util.List;
...
@@ -8,7 +8,7 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"changescene"
,
usage
=
"changescene <scene
i
d>"
,
aliases
=
{
"scene"
},
permission
=
"player.changescene"
,
permissionTargeted
=
"player.changescene.others"
,
description
=
"commands.changescene.description"
)
@Command
(
label
=
"changescene"
,
usage
=
"changescene <scene
I
d>"
,
aliases
=
{
"scene"
},
permission
=
"player.changescene"
,
permissionTargeted
=
"player.changescene.others"
,
description
=
"commands.changescene.description"
)
public
final
class
ChangeSceneCommand
implements
CommandHandler
{
public
final
class
ChangeSceneCommand
implements
CommandHandler
{
@Override
@Override
...
...
src/main/java/emu/grasscutter/command/commands/CoopCommand.java
View file @
02e737e9
...
@@ -9,7 +9,7 @@ import java.util.List;
...
@@ -9,7 +9,7 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"coop"
,
usage
=
"coop
[host UID]
"
,
permission
=
"server.coop"
,
permissionTargeted
=
"server.coop.others"
,
description
=
"commands.coop.description"
)
@Command
(
label
=
"coop"
,
usage
=
"coop
<playerId> <target playerId>
"
,
permission
=
"server.coop"
,
permissionTargeted
=
"server.coop.others"
,
description
=
"commands.coop.description"
)
public
final
class
CoopCommand
implements
CommandHandler
{
public
final
class
CoopCommand
implements
CommandHandler
{
@Override
@Override
...
...
src/main/java/emu/grasscutter/command/commands/GiveCharCommand.java
View file @
02e737e9
...
@@ -12,7 +12,7 @@ import java.util.List;
...
@@ -12,7 +12,7 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"givechar"
,
usage
=
"givechar
<player>
<avatarId> [level]"
,
aliases
=
{
"givec"
},
permission
=
"player.givechar"
,
permissionTargeted
=
"player.givechar.others"
,
description
=
"commands.giveChar.description"
)
@Command
(
label
=
"givechar"
,
usage
=
"givechar <avatarId> [level]"
,
aliases
=
{
"givec"
},
permission
=
"player.givechar"
,
permissionTargeted
=
"player.givechar.others"
,
description
=
"commands.giveChar.description"
)
public
final
class
GiveCharCommand
implements
CommandHandler
{
public
final
class
GiveCharCommand
implements
CommandHandler
{
@Override
@Override
...
...
src/main/java/emu/grasscutter/command/commands/GiveCommand.java
View file @
02e737e9
...
@@ -16,7 +16,7 @@ import java.util.regex.Pattern;
...
@@ -16,7 +16,7 @@ import java.util.regex.Pattern;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"give"
,
usage
=
"give <itemId|itemName> [amount] [level]"
,
aliases
=
{
@Command
(
label
=
"give"
,
usage
=
"give <itemId|itemName> [amount] [level]
[refinement]
"
,
aliases
=
{
"g"
,
"item"
,
"giveitem"
},
permission
=
"player.give"
,
permissionTargeted
=
"player.give.others"
,
description
=
"commands.give.description"
)
"g"
,
"item"
,
"giveitem"
},
permission
=
"player.give"
,
permissionTargeted
=
"player.give.others"
,
description
=
"commands.give.description"
)
public
final
class
GiveCommand
implements
CommandHandler
{
public
final
class
GiveCommand
implements
CommandHandler
{
Pattern
lvlRegex
=
Pattern
.
compile
(
"l(?:vl?)?(\\d+)"
);
// Java is a joke of a proglang that doesn't have raw string literals
Pattern
lvlRegex
=
Pattern
.
compile
(
"l(?:vl?)?(\\d+)"
);
// Java is a joke of a proglang that doesn't have raw string literals
...
...
src/main/java/emu/grasscutter/command/commands/KillCharacterCommand.java
View file @
02e737e9
...
@@ -13,7 +13,7 @@ import java.util.List;
...
@@ -13,7 +13,7 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"killcharacter"
,
usage
=
"killcharacter
[playerID]
"
,
aliases
=
{
"suicide"
,
"kill"
},
permission
=
"player.killcharacter"
,
permissionTargeted
=
"player.killcharacter.others"
,
description
=
"commands.killCharacter.description"
)
@Command
(
label
=
"killcharacter"
,
usage
=
"killcharacter"
,
aliases
=
{
"suicide"
,
"kill"
},
permission
=
"player.killcharacter"
,
permissionTargeted
=
"player.killcharacter.others"
,
description
=
"commands.killCharacter.description"
)
public
final
class
KillCharacterCommand
implements
CommandHandler
{
public
final
class
KillCharacterCommand
implements
CommandHandler
{
@Override
@Override
...
...
src/main/java/emu/grasscutter/command/commands/ResetShopLimitCommand.java
View file @
02e737e9
...
@@ -9,7 +9,7 @@ import java.util.List;
...
@@ -9,7 +9,7 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"resetshop"
,
usage
=
"resetshop
<player id>
"
,
permission
=
"server.resetshop"
,
permissionTargeted
=
"server.resetshop.others"
,
description
=
"commands.resetShopLimit.description"
)
@Command
(
label
=
"resetshop"
,
usage
=
"resetshop"
,
permission
=
"server.resetshop"
,
permissionTargeted
=
"server.resetshop.others"
,
description
=
"commands.resetShopLimit.description"
)
public
final
class
ResetShopLimitCommand
implements
CommandHandler
{
public
final
class
ResetShopLimitCommand
implements
CommandHandler
{
@Override
@Override
...
...
src/main/java/emu/grasscutter/command/commands/SendMessageCommand.java
View file @
02e737e9
...
@@ -8,8 +8,8 @@ import java.util.List;
...
@@ -8,8 +8,8 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"s
ay
"
,
usage
=
"s
ay
<message>"
,
@Command
(
label
=
"s
endmessage
"
,
usage
=
"s
endmessage
<message>"
,
aliases
=
{
"sendservmsg"
,
"sendservermessage"
,
"sendmessage"
},
permission
=
"server.sendmessage"
,
permissionTargeted
=
"server.sendmessage.others"
,
description
=
"commands.sendMessage.description"
)
aliases
=
{
"say"
,
"sendservmsg"
,
"sendservermessage"
},
permission
=
"server.sendmessage"
,
permissionTargeted
=
"server.sendmessage.others"
,
description
=
"commands.sendMessage.description"
)
public
final
class
SendMessageCommand
implements
CommandHandler
{
public
final
class
SendMessageCommand
implements
CommandHandler
{
@Override
@Override
...
...
src/main/java/emu/grasscutter/command/commands/TalentCommand.java
View file @
02e737e9
...
@@ -14,7 +14,7 @@ import java.util.List;
...
@@ -14,7 +14,7 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"talent"
,
usage
=
"talent <talentI
D
> <value>"
,
permission
=
"player.settalent"
,
permissionTargeted
=
"player.settalent.others"
,
description
=
"commands.talent.description"
)
@Command
(
label
=
"talent"
,
usage
=
"talent <talentI
d
> <value>"
,
permission
=
"player.settalent"
,
permissionTargeted
=
"player.settalent.others"
,
description
=
"commands.talent.description"
)
public
final
class
TalentCommand
implements
CommandHandler
{
public
final
class
TalentCommand
implements
CommandHandler
{
private
void
setTalentLevel
(
Player
sender
,
Player
player
,
Avatar
avatar
,
int
talentId
,
int
talentLevel
)
{
private
void
setTalentLevel
(
Player
sender
,
Player
player
,
Avatar
avatar
,
int
talentId
,
int
talentLevel
)
{
int
oldLevel
=
avatar
.
getSkillLevelMap
().
get
(
talentId
);
int
oldLevel
=
avatar
.
getSkillLevelMap
().
get
(
talentId
);
...
...
src/main/resources/languages/en-US.json
View file @
02e737e9
...
@@ -167,7 +167,7 @@
...
@@ -167,7 +167,7 @@
"description"
:
"Gives the player a specified character"
"description"
:
"Gives the player a specified character"
},
},
"give"
:
{
"give"
:
{
"usage"
:
"Usage: give <player> <itemID|itemName> [amount] [level]"
,
"usage"
:
"Usage: give <player> <itemID|itemName> [amount] [level]
[refinement]
"
,
"refinement_only_applicable_weapons"
:
"Refinement is only applicable to weapons."
,
"refinement_only_applicable_weapons"
:
"Refinement is only applicable to weapons."
,
"refinement_must_between_1_and_5"
:
"Refinement must be between 1 and 5."
,
"refinement_must_between_1_and_5"
:
"Refinement must be between 1 and 5."
,
"given"
:
"Given %s of %s to %s."
,
"given"
:
"Given %s of %s to %s."
,
...
...
src/main/resources/languages/pl-PL.json
View file @
02e737e9
...
@@ -153,7 +153,7 @@
...
@@ -153,7 +153,7 @@
"invalid_avatar_or_player_id"
:
"Błędne ID postaci lub gracza."
"invalid_avatar_or_player_id"
:
"Błędne ID postaci lub gracza."
},
},
"give"
:
{
"give"
:
{
"usage"
:
"Użycie: give <gracz> <id przedmiotu | nazwa przedmiotu> [ilość] [poziom]"
,
"usage"
:
"Użycie: give <gracz> <id przedmiotu | nazwa przedmiotu> [ilość] [poziom]
[refinement]
"
,
"refinement_only_applicable_weapons"
:
"Ulepszenie można zastosować tylko dla broni."
,
"refinement_only_applicable_weapons"
:
"Ulepszenie można zastosować tylko dla broni."
,
"refinement_must_between_1_and_5"
:
"Ulepszenie musi być pomiędzy 1, a 5."
,
"refinement_must_between_1_and_5"
:
"Ulepszenie musi być pomiędzy 1, a 5."
,
"given"
:
"Dano %s %s dla %s."
,
"given"
:
"Dano %s %s dla %s."
,
...
...
src/main/resources/languages/zh-TW.json
View file @
02e737e9
...
@@ -167,7 +167,7 @@
...
@@ -167,7 +167,7 @@
"description"
:
"給予指定角色。"
"description"
:
"給予指定角色。"
},
},
"give"
:
{
"give"
:
{
"usage"
:
"用法:give <player> <itemId|itemName> [amount] [level]"
,
"usage"
:
"用法:give <player> <itemId|itemName> [amount] [level]
[refinement]
"
,
"refinement_only_applicable_weapons"
:
"精煉度只能施加在武器上面。"
,
"refinement_only_applicable_weapons"
:
"精煉度只能施加在武器上面。"
,
"refinement_must_between_1_and_5"
:
"精煉度必需在 1 到 5 之間。"
,
"refinement_must_between_1_and_5"
:
"精煉度必需在 1 到 5 之間。"
,
"given"
:
"已經將 %s 個 %s 給予 %s。"
,
"given"
:
"已經將 %s 個 %s 給予 %s。"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment