Skip to content

Releases: Rollczi/LiteCommands

LiteCommands v3.9.5

22 Dec 15:42
61f34a3
Compare
Choose a tag to compare

What's Changed

  • GH-498 Fabric command supports alias. Add an option to change the brigadier input inspection display. by @huanmeng-qwq in #498

Thanks @huanmeng-qwq ❤️

How to change the brigadier input inspection display?

LiteFabricFactory.client()
    .commands(new ClientCommand())
    .settings(settings -> settings.inputInspectionDisplay("[...]"))
    .build();

Update dependencies

implementation("dev.rollczi:{artifact}:3.9.5")
<dependency>
    <groupId>dev.rollczi</groupId>
    <artifactId>{artifact}</artifactId>
    <version>3.9.5</version>
</dependency>

⚠️ Replace {artifact} with platform artifact

Discord Sponsor

Full Changelog: v3.9.4...v3.9.5

v3.9.4

22 Dec 15:39
fd19489
Compare
Choose a tag to compare

What's Changed

  • GH-504 Fix nullable argument profiles (also fix for the bukkit platform) by @Rollczi in #504

Update dependencies

implementation("dev.rollczi:{artifact}:3.9.4")
<dependency>
    <groupId>dev.rollczi</groupId>
    <artifactId>{artifact}</artifactId>
    <version>3.9.4</version>
</dependency>

⚠️ Replace {artifact} with platform artifact

Discord Sponsor

Full Changelog: v3.9.3...v3.9.4

LiteCommands v3.9.3

22 Dec 15:38
Compare
Choose a tag to compare

What's Changed

⚠️ DON'T USE THIS RELEASE ON BUKKIT PLATFORM

Full Changelog: v3.9.2...v3.9.3

LiteCommands v3.9.2

22 Dec 15:36
Compare
Choose a tag to compare

What's Changed

Update dependencies

implementation("dev.rollczi:{artifact}:3.9.2")
<dependency>
    <groupId>dev.rollczi</groupId>
    <artifactId>{artifact}</artifactId>
    <version>3.9.2</version>
</dependency>

⚠️ Replace {artifact} with platform artifact

Discord Sponsor

Full Changelog: v3.9.1...v3.9.2

LiteCommands v3.9.1

11 Nov 12:56
d94823a
Compare
Choose a tag to compare

What's Changed

Update dependencies

implementation("dev.rollczi:{artifact}:3.9.1")
<dependency>
    <groupId>dev.rollczi</groupId>
    <artifactId>{artifact}</artifactId>
    <version>3.9.1</version>
</dependency>

⚠️ Replace {artifact} with platform artifact

Discord Sponsor

Full Changelog: v3.9.0...v3.9.1

LiteCommands v3.9.0

02 Nov 23:35
6a0cd90
Compare
Choose a tag to compare

What's Changed

Thanks you @huanmeng-qwq for the tooltips feature. 😻
Also thanks to @Knerio for helping me find the bug on JDA platform. ❤️

Update dependencies

implementation("dev.rollczi:{artifact}:3.9.0")
<dependency>
    <groupId>dev.rollczi</groupId>
    <artifactId>{artifact}</artifactId>
    <version>3.9.0</version>
</dependency>

⚠️ Replace {artifact} with platform artifact

Discord Sponsor

Full Changelog: v3.8.0...v3.9.0

LiteCommands v3.8.0

23 Oct 18:29
Compare
Choose a tag to compare

What's Changed

Update dependencies

implementation("dev.rollczi:{artifact}:3.8.0")
<dependency>
    <groupId>dev.rollczi</groupId>
    <artifactId>{artifact}</artifactId>
    <version>3.8.0</version>
</dependency>

⚠️ Replace {artifact} with platform artifact

Discord Sponsor

Full Changelog: v3.7.1...v3.8.0

LiteCommands v3.7.1

18 Oct 18:55
d1a7a4d
Compare
Choose a tag to compare

What's Changed

Thanks @TheDarkW3b ❤️ 📃

Update dependencies

implementation("dev.rollczi:{artifact}:3.7.1")
<dependency>
    <groupId>dev.rollczi</groupId>
    <artifactId>{artifact}</artifactId>
    <version>3.7.1</version>
</dependency>

⚠️ Replace {artifact} with platform artifact

Discord Sponsor

New Contributors

Full Changelog: v3.7.0...v3.7.1

LiteCommands v3.7.0

13 Oct 12:12
98b803f
Compare
Choose a tag to compare

What's Changed

Thanks @OOP-778 for the important bug fix ❤️

🟢 Add alias for @Context annotation

@Command(name = "hello")
public class HelloCommand {
    @Execute
    void command(@Sender CommandSender sender, @Arg String name) {
        // ...
    }
}

🟢 Add an option to create Annotation aliases like as @Sender

You can implement your annotation:

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.PARAMETER)
@RequirementDefinition(type = RequirementDefinition.Type.CONTEXT)
public @interface MySender {
}

And use it in your commands:

    @Execute
    void command(@MySender CommandSender sender, @Arg String name) {
        // ...
    }

🟢 Support completableFuture/async parse/context result:

public class UserArgumentResolver extends ArgumentResolver<CommandSender, User> {

    private final Pattern VALID_USER_PATTERN = Pattern.compile("^[a-zA-Z0-9_]{3,16}$");
    private final UserService userService;

    public UserArgumentResolver(UserService userService) {
        this.userService = userService;
    }

    @Override
    protected ParseResult<User> parse(Invocation<CommandSender> invocation, Argument<User> context, String argument) {
        CompletableFuture<ParseResult<User>> userNotFound = userService.getUser(argument)
            .thenApply(user -> user != null ? ParseResult.success(user) : ParseResult.failure("User not found"));

        return ParseResult.completableFuture(userNotFound);
    }

    @Override
    public boolean match(Invocation<CommandSender> invocation, Argument<User> context, String argument) {
        return VALID_USER_PATTERN.matcher(argument).matches();
    }
}

🟢 when you call blocking methods you can use ParseResult.async()

    @Override
    protected ParseResult<User> parse(Invocation<CommandSender> invocation, Argument<User> context, String argument) {
        return ParseResult.async(() -> userDatabase.getUser(argument));
    }

⚠️ When you return async/completableFuture result then you must also implement match method for correct suggestion validation

🟢 See also same API for ContextResult

ContextResult.completableFuture()
ContextResult.async()

🔴 Removed wrapper API

🔴 Breaking changes (Internal API)

See more #435

Update dependencies

implementation("dev.rollczi:{artifact}:3.7.0")
<dependency>
    <groupId>dev.rollczi</groupId>
    <artifactId>{artifact}</artifactId>
    <version>3.7.0</version>
</dependency>

⚠️ Replace {artifact} with platform artifact

Discord Sponsor

New Contributors

Full Changelog: v3.6.1...v3.7.0

LiteCommands v3.6.1

01 Oct 16:10
792185d
Compare
Choose a tag to compare

What's Changed

Thanks for @BlackBaroness

Update dependencies

implementation("dev.rollczi:{artifact}:3.6.1")
<dependency>
    <groupId>dev.rollczi</groupId>
    <artifactId>{artifact}</artifactId>
    <version>3.6.1</version>
</dependency>

⚠️ Replace {artifact} with platform artifact

Discord Sponsor

Full Changelog: v3.6.0...v3.6.1