Skip to content

Commit f93c915

Browse files
authored
Merge pull request #16 from SLNE-Development/fix/commandAPI-arguments
fix: editing the CommandAPI argument
2 parents 1a1393b + df10e3e commit f93c915

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
kotlin.code.style=official
22
kotlin.stdlib.default.dependency=false
33
org.gradle.parallel=true
4-
version=1.21.10-1.3.0-SNAPSHOT
4+
version=1.21.10-1.3.1-SNAPSHOT

src/main/kotlin/dev/slne/surf/moderation/tools/commands/FreezeCommand.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ package dev.slne.surf.moderation.tools.commands
22

33
import com.github.shynixn.mccoroutine.folia.entityDispatcher
44
import com.github.shynixn.mccoroutine.folia.launch
5+
import dev.jorel.commandapi.arguments.PlayerProfileArgument
56
import dev.jorel.commandapi.kotlindsl.anyExecutor
67
import dev.jorel.commandapi.kotlindsl.commandAPICommand
78
import dev.jorel.commandapi.kotlindsl.getValue
8-
import dev.jorel.commandapi.kotlindsl.playerArgument
99
import dev.slne.surf.moderation.tools.plugin
1010
import dev.slne.surf.moderation.tools.service.freezeService
1111
import dev.slne.surf.moderation.tools.utils.PermissionRegistry
@@ -16,7 +16,7 @@ import org.bukkit.entity.Player
1616

1717
fun freezeCommand() = commandAPICommand("freeze") {
1818
withPermission(PermissionRegistry.COMMAND_FREEZE)
19-
playerArgument("targetPlayer")
19+
PlayerProfileArgument("targetPlayer")
2020
durationArgument("duration")
2121

2222
anyExecutor { sender, args ->

src/main/kotlin/dev/slne/surf/moderation/tools/commands/RotateCommand.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ package dev.slne.surf.moderation.tools.commands
22

33
import com.github.shynixn.mccoroutine.folia.entityDispatcher
44
import com.github.shynixn.mccoroutine.folia.launch
5+
import dev.jorel.commandapi.arguments.PlayerProfileArgument
56
import dev.jorel.commandapi.kotlindsl.anyExecutor
67
import dev.jorel.commandapi.kotlindsl.commandAPICommand
78
import dev.jorel.commandapi.kotlindsl.getValue
8-
import dev.jorel.commandapi.kotlindsl.playerArgument
99
import dev.slne.surf.moderation.tools.plugin
1010
import dev.slne.surf.moderation.tools.utils.PermissionRegistry
1111
import dev.slne.surf.surfapi.core.api.messages.adventure.sendText
1212
import org.bukkit.entity.Player
1313

1414
fun rotateCommand() = commandAPICommand("rotate") {
15-
playerArgument("targetPlayer")
15+
PlayerProfileArgument("targetPlayer")
1616
withPermission(PermissionRegistry.COMMAND_ROTATE)
1717

1818
anyExecutor { sender, args ->

src/main/kotlin/dev/slne/surf/moderation/tools/commands/UnfreezeCommand.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
package dev.slne.surf.moderation.tools.commands
22

3+
import dev.jorel.commandapi.arguments.PlayerProfileArgument
34
import dev.jorel.commandapi.kotlindsl.anyExecutor
45
import dev.jorel.commandapi.kotlindsl.commandAPICommand
56
import dev.jorel.commandapi.kotlindsl.getValue
6-
import dev.jorel.commandapi.kotlindsl.playerArgument
77
import dev.slne.surf.moderation.tools.service.freezeService
88
import dev.slne.surf.moderation.tools.utils.PermissionRegistry
99
import dev.slne.surf.surfapi.core.api.messages.adventure.sendText
1010
import org.bukkit.entity.Player
1111

1212
fun unfreezeCommand() = commandAPICommand("unfreeze") {
13-
playerArgument("targetPlayer")
13+
PlayerProfileArgument("targetPlayer")
1414
withPermission(PermissionRegistry.COMMAND_UNFREEZE)
1515

1616
anyExecutor { sender, args ->

0 commit comments

Comments
 (0)