Skip to content

Commit 7f8f63e

Browse files
authored
fix: make the player kick command reason quoted to allow flags (#1374)
### Motivation Cloud does not parse flags provided after a greedy string argument. This results in the --force flag of the players kick command being useless. ### Modification The reason for the kick is now provided as quoted string and the flag is parsed correctly. ### Result The force kick flag is usable.
1 parent 61b081e commit 7f8f63e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/bridge/src/main/java/eu/cloudnetservice/modules/bridge/node/command/PlayersCommand.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import cloud.commandframework.annotations.Flag;
2323
import cloud.commandframework.annotations.parsers.Parser;
2424
import cloud.commandframework.annotations.specifier.Greedy;
25+
import cloud.commandframework.annotations.specifier.Quoted;
2526
import cloud.commandframework.annotations.suggestions.Suggestions;
2627
import cloud.commandframework.context.CommandContext;
2728
import eu.cloudnetservice.common.Named;
@@ -217,7 +218,7 @@ public void deletePlayer(
217218
public void kickPlayer(
218219
@NonNull CommandSource source,
219220
@NonNull @Argument("player") CloudPlayer player,
220-
@Nullable @Greedy @Argument("reason") String reason,
221+
@Nullable @Quoted @Argument("reason") String reason,
221222
@Flag("force") boolean force
222223
) {
223224
var reasonComponent = reason == null

0 commit comments

Comments
 (0)