Skip to content

Commit f546fce

Browse files
committed
[SpeedCommand] All use same permission
1 parent 6bab961 commit f546fce

File tree

1 file changed

+4
-4
lines changed
  • bukkit/src/main/kotlin/io/github/rothes/esu/bukkit/module/essentialcommands

1 file changed

+4
-4
lines changed

bukkit/src/main/kotlin/io/github/rothes/esu/bukkit/module/essentialcommands/Speed.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ object Speed : BaseCommand<Speed.Config, Speed.Lang>() {
4646
{ player -> if (player.isFlying) FlySpeed else WalkSpeed }
4747
withCommandManager {
4848
commandBuilder(name + "Get") {
49-
permission(cmdShortPerm())
49+
permission(this@Speed.cmdShortPerm())
5050
handler { ctx ->
5151
val sender = ctx.sender()
5252
val player = ctx.getOrSupplyDefault("player") { (sender as PlayerUser).player }
5353
handlerGetter(player).getSpeed(sender, player)
5454
}.regCmd()
5555

56-
permission(cmdShortPerm("others"))
56+
permission(this@Speed.cmdShortPerm("others"))
5757
optional("player", PlayerParser.playerParser())
5858
regCmd()
5959
}
6060
commandBuilder(name) {
61-
permission(cmdShortPerm())
61+
permission(this@Speed.cmdShortPerm())
6262

6363
handler { ctx ->
6464
val sender = ctx.sender()
@@ -73,7 +73,7 @@ object Speed : BaseCommand<Speed.Config, Speed.Lang>() {
7373
scope()
7474
regCmd()
7575

76-
permission(cmdShortPerm("others"))
76+
permission(this@Speed.cmdShortPerm("others"))
7777
optional("player", PlayerParser.playerParser())
7878
regCmd()
7979
}

0 commit comments

Comments
 (0)