Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CustomArgumentException fromString doesn't support rgb #473

@Zoltus

Description

@Zoltus

CommandAPI version

9.0.3

Minecraft version

1.20.1

Are you shading the CommandAPI?

Yes

What I did

public class GamemodeArgument extends CustomArgument<GameMode, String> implements IArgument {

    public GamemodeArgument() {
        super(new StringArgument(Lang.NODES_GAMEMODE.getString()), info -> {
            GameMode gm = getGamemode(info.input());
            if (gm == null) {
                throw CustomArgumentException.fromString("§x§F§F§5§1§5§1R§x§F§F§5§E§5§Eo§x§F§F§6§C§6§Cm§x§F§F§7§9§7§9u§x§F§F§8§7§8§7n§x§F§F§9§4§9§4a");
            } else {
                return gm;
            }
        });
    }
}

What actually happened

It does handle the colors the wrong way.

What should have happened

it should output rgb colors

Server logs and CommandAPI config

no logs/errors.

Other

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingimplemented for next releaseThis has been implemented in the current dev build for the next public release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions