Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix command RemainArgNode default value type #471

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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