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
80db118f
Commit
80db118f
authored
May 06, 2022
by
AnimeGitB
Committed by
Melledy
May 09, 2022
Browse files
Add permissionTargeted to applicable commands
Change target perm from target.perm to x.perm.others
parent
056b5b80
Changes
24
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/command/commands/ChangeSceneCommand.java
View file @
80db118f
...
...
@@ -8,7 +8,7 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"changescene"
,
usage
=
"changescene <scene id>"
,
aliases
=
{
"scene"
},
permission
=
"player.changescene"
,
description
=
"commands.changescene.description"
)
@Command
(
label
=
"changescene"
,
usage
=
"changescene <scene id>"
,
aliases
=
{
"scene"
},
permission
=
"player.changescene"
,
permissionTargeted
=
"player.changescene.others"
,
description
=
"commands.changescene.description"
)
public
final
class
ChangeSceneCommand
implements
CommandHandler
{
@Override
...
...
src/main/java/emu/grasscutter/command/commands/ClearCommand.java
View file @
80db118f
...
...
@@ -14,7 +14,7 @@ import static emu.grasscutter.utils.Language.translate;
@Command
(
label
=
"clear"
,
usage
=
"clear <all|wp|art|mat>"
,
//Merged /clearartifacts and /clearweapons to /clear <args> [uid]
description
=
"commands.clear.description"
,
aliases
=
{
"clear"
},
permission
=
"player.clearinv"
)
aliases
=
{
"clear"
},
permission
=
"player.clearinv"
,
permissionTargeted
=
"player.clearinv.others"
)
public
final
class
ClearCommand
implements
CommandHandler
{
...
...
src/main/java/emu/grasscutter/command/commands/CoopCommand.java
View file @
80db118f
...
...
@@ -9,7 +9,7 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"coop"
,
usage
=
"coop [host UID]"
,
permission
=
"server.coop"
,
description
=
"commands.coop.description"
)
@Command
(
label
=
"coop"
,
usage
=
"coop [host UID]"
,
permission
=
"server.coop"
,
permissionTargeted
=
"server.coop.others"
,
description
=
"commands.coop.description"
)
public
final
class
CoopCommand
implements
CommandHandler
{
@Override
...
...
src/main/java/emu/grasscutter/command/commands/DropCommand.java
View file @
80db118f
...
...
@@ -13,7 +13,7 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"drop"
,
usage
=
"drop <itemId|itemName> [amount]"
,
aliases
=
{
"d"
,
"dropitem"
},
permission
=
"server.drop"
,
description
=
"commands.drop.description"
)
@Command
(
label
=
"drop"
,
usage
=
"drop <itemId|itemName> [amount]"
,
aliases
=
{
"d"
,
"dropitem"
},
permission
=
"server.drop"
,
permissionTargeted
=
"server.drop.others"
,
description
=
"commands.drop.description"
)
public
final
class
DropCommand
implements
CommandHandler
{
@Override
...
...
src/main/java/emu/grasscutter/command/commands/EnterDungeonCommand.java
View file @
80db118f
...
...
@@ -8,7 +8,7 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"enterdungeon"
,
usage
=
"enterdungeon <dungeon id>"
,
aliases
=
{
"dungeon"
},
permission
=
"player.enterdungeon"
,
description
=
"commands.enter_dungeon.description"
)
@Command
(
label
=
"enterdungeon"
,
usage
=
"enterdungeon <dungeon id>"
,
aliases
=
{
"dungeon"
},
permission
=
"player.enterdungeon"
,
permissionTargeted
=
"player.enterdungeon.others"
,
description
=
"commands.enter_dungeon.description"
)
public
final
class
EnterDungeonCommand
implements
CommandHandler
{
@Override
...
...
src/main/java/emu/grasscutter/command/commands/GiveAllCommand.java
View file @
80db118f
...
...
@@ -15,7 +15,7 @@ import java.util.*;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"giveall"
,
usage
=
"giveall [amount]"
,
aliases
=
{
"givea"
},
permission
=
"player.giveall"
,
threading
=
true
,
description
=
"commands.giveAll.description"
)
@Command
(
label
=
"giveall"
,
usage
=
"giveall [amount]"
,
aliases
=
{
"givea"
},
permission
=
"player.giveall"
,
permissionTargeted
=
"player.giveall.others"
,
threading
=
true
,
description
=
"commands.giveAll.description"
)
public
final
class
GiveAllCommand
implements
CommandHandler
{
@Override
...
...
src/main/java/emu/grasscutter/command/commands/GiveArtifactCommand.java
View file @
80db118f
...
...
@@ -19,7 +19,7 @@ import static java.util.Map.entry;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"giveart"
,
usage
=
"giveart <artifactId> <mainPropId> [<appendPropId>[,<times>]]... [level]"
,
aliases
=
{
"gart"
},
permission
=
"player.giveart"
,
description
=
"commands.giveArtifact.description"
)
@Command
(
label
=
"giveart"
,
usage
=
"giveart <artifactId> <mainPropId> [<appendPropId>[,<times>]]... [level]"
,
aliases
=
{
"gart"
},
permission
=
"player.giveart"
,
permissionTargeted
=
"player.giveart.others"
,
description
=
"commands.giveArtifact.description"
)
public
final
class
GiveArtifactCommand
implements
CommandHandler
{
private
static
final
Map
<
String
,
Map
<
EquipType
,
Integer
>>
mainPropMap
=
Map
.
ofEntries
(
entry
(
"hp"
,
Map
.
ofEntries
(
entry
(
EquipType
.
EQUIP_BRACER
,
14001
))),
...
...
src/main/java/emu/grasscutter/command/commands/GiveCharCommand.java
View file @
80db118f
...
...
@@ -12,7 +12,7 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"givechar"
,
usage
=
"givechar <avatarId> [level]"
,
aliases
=
{
"givec"
},
permission
=
"player.givechar"
,
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
{
@Override
...
...
src/main/java/emu/grasscutter/command/commands/GiveCommand.java
View file @
80db118f
...
...
@@ -17,7 +17,7 @@ import java.util.regex.Pattern;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"give"
,
usage
=
"give <itemId|itemName> [amount] [level]"
,
aliases
=
{
"g"
,
"item"
,
"giveitem"
},
permission
=
"player.give"
,
description
=
"commands.give.description"
)
"g"
,
"item"
,
"giveitem"
},
permission
=
"player.give"
,
description
=
"commands.give.description"
,
permissionTargeted
=
"player.give.others"
)
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
refineRegex
=
Pattern
.
compile
(
"r(\\d+)"
);
...
...
src/main/java/emu/grasscutter/command/commands/GodModeCommand.java
View file @
80db118f
...
...
@@ -8,7 +8,7 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"godmode"
,
usage
=
"godmode [on|off|toggle]"
,
permission
=
"player.godmode"
,
description
=
"commands.godmode.description"
)
@Command
(
label
=
"godmode"
,
usage
=
"godmode [on|off|toggle]"
,
permission
=
"player.godmode"
,
permissionTargeted
=
"player.godmode.others"
,
description
=
"commands.godmode.description"
)
public
final
class
GodModeCommand
implements
CommandHandler
{
@Override
...
...
src/main/java/emu/grasscutter/command/commands/HealCommand.java
View file @
80db118f
...
...
@@ -11,7 +11,7 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"heal"
,
usage
=
"heal|h"
,
aliases
=
{
"h"
},
permission
=
"player.heal"
,
description
=
"commands.heal.description"
)
@Command
(
label
=
"heal"
,
usage
=
"heal|h"
,
aliases
=
{
"h"
},
permission
=
"player.heal"
,
permissionTargeted
=
"player.heal.others"
,
description
=
"commands.heal.description"
)
public
final
class
HealCommand
implements
CommandHandler
{
@Override
...
...
src/main/java/emu/grasscutter/command/commands/KillAllCommand.java
View file @
80db118f
...
...
@@ -12,7 +12,7 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"killall"
,
usage
=
"killall [sceneId]"
,
permission
=
"server.killall"
,
description
=
"commands.kill.description"
)
@Command
(
label
=
"killall"
,
usage
=
"killall [sceneId]"
,
permission
=
"server.killall"
,
permissionTargeted
=
"server.killall.others"
,
description
=
"commands.kill.description"
)
public
final
class
KillAllCommand
implements
CommandHandler
{
@Override
...
...
src/main/java/emu/grasscutter/command/commands/KillCharacterCommand.java
View file @
80db118f
...
...
@@ -13,7 +13,7 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"killcharacter"
,
usage
=
"killcharacter"
,
aliases
=
{
"suicide"
,
"kill"
},
permission
=
"player.killcharacter"
,
description
=
"commands.list.description"
)
@Command
(
label
=
"killcharacter"
,
usage
=
"killcharacter"
,
aliases
=
{
"suicide"
,
"kill"
},
permission
=
"player.killcharacter"
,
permissionTargeted
=
"player.killcharacter.others"
,
description
=
"commands.list.description"
)
public
final
class
KillCharacterCommand
implements
CommandHandler
{
@Override
...
...
src/main/java/emu/grasscutter/command/commands/ResetConstCommand.java
View file @
80db118f
...
...
@@ -11,7 +11,7 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"resetconst"
,
usage
=
"resetconst [all]"
,
aliases
=
{
"resetconstellation"
},
permission
=
"player.resetconstellation"
,
description
=
"commands.resetConst.description"
)
aliases
=
{
"resetconstellation"
},
permission
=
"player.resetconstellation"
,
permissionTargeted
=
"player.resetconstellation.others"
,
description
=
"commands.resetConst.description"
)
public
final
class
ResetConstCommand
implements
CommandHandler
{
@Override
...
...
src/main/java/emu/grasscutter/command/commands/ResetShopLimitCommand.java
View file @
80db118f
...
...
@@ -9,7 +9,7 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"resetshop"
,
usage
=
"resetshop"
,
permission
=
"server.resetshop"
,
description
=
"commands.status.description"
)
@Command
(
label
=
"resetshop"
,
usage
=
"resetshop"
,
permission
=
"server.resetshop"
,
permissionTargeted
=
"server.resetshop.others"
,
description
=
"commands.status.description"
)
public
final
class
ResetShopLimitCommand
implements
CommandHandler
{
@Override
...
...
src/main/java/emu/grasscutter/command/commands/SendMessageCommand.java
View file @
80db118f
...
...
@@ -9,7 +9,7 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"say"
,
usage
=
"say <message>"
,
aliases
=
{
"sendservmsg"
,
"sendservermessage"
,
"sendmessage"
},
permission
=
"server.sendmessage"
,
description
=
"commands.sendMessage.description"
)
aliases
=
{
"sendservmsg"
,
"sendservermessage"
,
"sendmessage"
},
permission
=
"server.sendmessage"
,
permissionTargeted
=
"server.sendmessage.others"
,
description
=
"commands.sendMessage.description"
)
public
final
class
SendMessageCommand
implements
CommandHandler
{
@Override
...
...
src/main/java/emu/grasscutter/command/commands/SetFetterLevelCommand.java
View file @
80db118f
...
...
@@ -12,7 +12,7 @@ import emu.grasscutter.server.packet.send.PacketAvatarFetterDataNotify;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"setfetterlevel"
,
usage
=
"setfetterlevel <level>"
,
aliases
=
{
"setfetterlvl"
,
"setfriendship"
},
permission
=
"player.setfetterlevel"
,
description
=
"commands.setFetterLevel.description"
)
aliases
=
{
"setfetterlvl"
,
"setfriendship"
},
permission
=
"player.setfetterlevel"
,
permissionTargeted
=
"player.setfetterlevel.others"
,
description
=
"commands.setFetterLevel.description"
)
public
final
class
SetFetterLevelCommand
implements
CommandHandler
{
@Override
...
...
src/main/java/emu/grasscutter/command/commands/SetStatsCommand.java
View file @
80db118f
...
...
@@ -15,7 +15,7 @@ import emu.grasscutter.utils.Language;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"setstats"
,
usage
=
"setstats|stats <stat> <value>"
,
aliases
=
{
"stats"
},
permission
=
"player.setstats"
,
description
=
"commands.setStats.description"
)
@Command
(
label
=
"setstats"
,
usage
=
"setstats|stats <stat> <value>"
,
aliases
=
{
"stats"
},
permission
=
"player.setstats"
,
permissionTargeted
=
"player.setstats.others"
,
description
=
"commands.setStats.description"
)
public
final
class
SetStatsCommand
implements
CommandHandler
{
static
class
Stat
{
String
name
;
...
...
src/main/java/emu/grasscutter/command/commands/SetWorldLevelCommand.java
View file @
80db118f
...
...
@@ -10,7 +10,7 @@ import java.util.List;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"setworldlevel"
,
usage
=
"setworldlevel <level>"
,
aliases
=
{
"setworldlvl"
},
permission
=
"player.setworldlevel"
,
description
=
"commands.setWorldLevel.description"
)
aliases
=
{
"setworldlvl"
},
permission
=
"player.setworldlevel"
,
permissionTargeted
=
"player.setworldlevel.others"
,
description
=
"commands.setWorldLevel.description"
)
public
final
class
SetWorldLevelCommand
implements
CommandHandler
{
@Override
...
...
src/main/java/emu/grasscutter/command/commands/SpawnCommand.java
View file @
80db118f
...
...
@@ -22,7 +22,7 @@ import java.util.Random;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
@Command
(
label
=
"spawn"
,
usage
=
"spawn <entityId> [amount] [level(monster only)]"
,
permission
=
"server.spawn"
,
description
=
"commands.spawn.description"
)
@Command
(
label
=
"spawn"
,
usage
=
"spawn <entityId> [amount] [level(monster only)]"
,
permission
=
"server.spawn"
,
permissionTargeted
=
"server.spawn.others"
,
description
=
"commands.spawn.description"
)
public
final
class
SpawnCommand
implements
CommandHandler
{
@Override
...
...
Prev
1
2
Next
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