.
All checks were successful
Build and Deploy artifact / build (push) Successful in 1m17s

This commit is contained in:
kento2 2026-08-09 00:42:09 +02:00
parent 40af6b246d
commit 997906cd02
3 changed files with 35 additions and 10 deletions

View file

@ -1,8 +1,3 @@
## TODO
CI/CD:
- actually publish package
## Build
after installing bazel:
@ -51,20 +46,18 @@ literal:coins/balance
### As code
```java
import de.kentoj.kencommandapi.api.literal.RootLiteral;
/**
* Show the amount coins a user has.
* If no user is given, it should show the amount the sender of the command has.
*/
public class CoinsCommand {
public final class CoinsCommand {
private final RootLiteral<User> rootLiteral;
private final CommandArgumentSpec<User, User> userArg;
public CoinsCommand() {
userArg = CommandArgumentSpec.builder("user", new UserArgumentType<User>())
.withRequirement(p -> !p.hasPermission("economy.immune.getcoins"),
.withRequirement(user -> !user.hasPermission("economy.immune.getcoins"),
"you can't see that player's balance")
.withDefaultValue(CommandContext::sender)
.build();