Skip to content

Commit

Permalink
fix: Fix command RemainArgNode default value type (#471)
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-xi authored Nov 2, 2024
1 parent 4b12eda commit e7a7a66
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ default CommandNode remain(String name) {
*
* @return This {@code CommandNode}.
*/
default CommandNode remain(String name, Object defaultValue) {
default CommandNode remain(String name, List<String> defaultValue) {
return addLeaf(getFactory().remain(name, this, defaultValue));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static CommandNodeFactory getFactory() {
*
* @return a new {@code CommandNode} for the remaining arguments.
*/
CommandNode remain(String name, CommandNode parent, Object defaultValue);
CommandNode remain(String name, CommandNode parent, List<String> defaultValue);

/**
* Creates a command node for a target argument that allows selecting multiple entities.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public CommandNode msg(String name, CommandNode parent, String defaultValue) {
}

@Override
public CommandNode remain(String name, CommandNode parent, Object defaultValue) {
public CommandNode remain(String name, CommandNode parent, List<String> defaultValue) {
return new RemainArgNode(name, parent, defaultValue);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
import org.cloudburstmc.protocol.bedrock.data.command.CommandParamData;

import java.util.ArrayList;
import java.util.List;

/**
* @author daoge_cmd
*/
public class RemainArgNode extends BaseNode {
public RemainArgNode(String name, CommandNode parent, Object defaultValue) {
public RemainArgNode(String name, CommandNode parent, List<String> defaultValue) {
super(name, parent, defaultValue);
}

Expand Down

0 comments on commit e7a7a66

Please sign in to comment.