diff --git a/README.md b/README.md
index d4eeb151e..aaa004d2b 100644
--- a/README.md
+++ b/README.md
@@ -34,12 +34,12 @@ Framework Core
dev.rollczi
litecommands-core
- 3.0.0-BETA-pre20
+ 3.0.0-BETA-pre21
```
```groovy
-implementation 'dev.rollczi:litecommands-core:3.0.0-BETA-pre20'
+implementation 'dev.rollczi:litecommands-core:3.0.0-BETA-pre21'
```
### First Simple Command
@@ -85,12 +85,12 @@ Add this to your dependencies if you want to use ready-made implementation for v
dev.rollczi
litecommands-velocity
- 3.0.0-BETA-pre20
+ 3.0.0-BETA-pre21
```
```groovy
-implementation 'dev.rollczi:litecommands-velocity:3.0.0-BETA-pre20'
+implementation 'dev.rollczi:litecommands-velocity:3.0.0-BETA-pre21'
```
#### Add -parameters to your compiler to use all features of LiteCommands
diff --git a/buildSrc/src/main/kotlin/litecommands-publish.gradle.kts b/buildSrc/src/main/kotlin/litecommands-publish.gradle.kts
index c2c83b4d9..4a44a44da 100644
--- a/buildSrc/src/main/kotlin/litecommands-publish.gradle.kts
+++ b/buildSrc/src/main/kotlin/litecommands-publish.gradle.kts
@@ -4,7 +4,7 @@ plugins {
}
group = "dev.rollczi"
-version = "3.0.0-BETA-pre20"
+version = "3.0.0-BETA-pre21"
java {
withSourcesJar()
diff --git a/examples/bukkit-adventure-platform/build.gradle.kts b/examples/bukkit-adventure-platform/build.gradle.kts
index 56ac5285c..10f801835 100644
--- a/examples/bukkit-adventure-platform/build.gradle.kts
+++ b/examples/bukkit-adventure-platform/build.gradle.kts
@@ -18,8 +18,8 @@ repositories {
dependencies {
compileOnly("org.spigotmc:spigot-api:1.20.2-R0.1-SNAPSHOT")
- // implementation("dev.rollczi:litecommands-bukkit:3.0.0-BETA-pre20") // <-- uncomment in your project
- // implementation("dev.rollczi:litecommands-adventure-platform:3.0.0-BETA-pre20") // <-- uncomment in your project
+ // implementation("dev.rollczi:litecommands-bukkit:3.0.0-BETA-pre21") // <-- uncomment in your project
+ // implementation("dev.rollczi:litecommands-adventure-platform:3.0.0-BETA-pre21") // <-- uncomment in your project
implementation("net.kyori:adventure-platform-bukkit:4.3.0")
implementation("net.kyori:adventure-text-minimessage:4.14.0")
diff --git a/examples/bukkit-chatgpt/build.gradle.kts b/examples/bukkit-chatgpt/build.gradle.kts
index 98e080262..a7300758a 100644
--- a/examples/bukkit-chatgpt/build.gradle.kts
+++ b/examples/bukkit-chatgpt/build.gradle.kts
@@ -18,8 +18,8 @@ repositories {
dependencies {
compileOnly("org.spigotmc:spigot-api:1.20.2-R0.1-SNAPSHOT")
- // implementation("dev.rollczi:litecommands-bukkit:3.0.0-BETA-pre20") // <-- uncomment in your project
- // implementation("dev.rollczi:litecommands-chatgpt:3.0.0-BETA-pre20") // <-- uncomment in your project
+ // implementation("dev.rollczi:litecommands-bukkit:3.0.0-BETA-pre21") // <-- uncomment in your project
+ // implementation("dev.rollczi:litecommands-chatgpt:3.0.0-BETA-pre21") // <-- uncomment in your project
implementation(project(":litecommands-bukkit")) // don't use this line in your build.gradle
implementation(project(":litecommands-chatgpt")) // don't use this line in your build.gradle
}
diff --git a/examples/bukkit/build.gradle.kts b/examples/bukkit/build.gradle.kts
index a2b44f90a..067a9c374 100644
--- a/examples/bukkit/build.gradle.kts
+++ b/examples/bukkit/build.gradle.kts
@@ -18,7 +18,7 @@ repositories {
dependencies {
compileOnly("org.spigotmc:spigot-api:1.20.2-R0.1-SNAPSHOT")
- // implementation("dev.rollczi:litecommands-bukkit:3.0.0-BETA-pre20") // <-- uncomment in your project
+ // implementation("dev.rollczi:litecommands-bukkit:3.0.0-BETA-pre21") // <-- uncomment in your project
implementation(project(":litecommands-bukkit")) // don't use this line in your build.gradle
}
diff --git a/examples/velocity/build.gradle.kts b/examples/velocity/build.gradle.kts
index 4432870e0..db2e6b03d 100644
--- a/examples/velocity/build.gradle.kts
+++ b/examples/velocity/build.gradle.kts
@@ -19,7 +19,7 @@ dependencies {
compileOnly("com.velocitypowered:velocity-api:3.2.0-SNAPSHOT")
annotationProcessor("com.velocitypowered:velocity-api:3.2.0-SNAPSHOT")
- // implementation("dev.rollczi:litecommands-velocity:3.0.0-BETA-pre20") // <-- uncomment in your project
+ // implementation("dev.rollczi:litecommands-velocity:3.0.0-BETA-pre21") // <-- uncomment in your project
implementation(project(":litecommands-velocity")) // don't use this line in your build.gradle
}
diff --git a/litecommands-core/src/dev/rollczi/litecommands/command/builder/CommandBuilder.java b/litecommands-core/src/dev/rollczi/litecommands/command/builder/CommandBuilder.java
index 8babfd2da..4d439ee9b 100644
--- a/litecommands-core/src/dev/rollczi/litecommands/command/builder/CommandBuilder.java
+++ b/litecommands-core/src/dev/rollczi/litecommands/command/builder/CommandBuilder.java
@@ -39,6 +39,9 @@ public interface CommandBuilder extends Scopeable, MetaHolder {
@NotNull
CommandBuilder enable();
+ @NotNull
+ CommandBuilder enabled(boolean enabled);
+
@NotNull
CommandBuilder disable();
diff --git a/litecommands-core/src/dev/rollczi/litecommands/command/builder/CommandBuilderBase.java b/litecommands-core/src/dev/rollczi/litecommands/command/builder/CommandBuilderBase.java
index 4da69f250..4230013d5 100644
--- a/litecommands-core/src/dev/rollczi/litecommands/command/builder/CommandBuilderBase.java
+++ b/litecommands-core/src/dev/rollczi/litecommands/command/builder/CommandBuilderBase.java
@@ -95,6 +95,12 @@ public boolean hasSimilarNames(CommandBuilder context) {
return this;
}
+ @Override
+ public @NotNull CommandBuilder enabled(boolean enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
@Override
public @NotNull CommandBuilder disable() {
this.enabled = false;
diff --git a/litecommands-core/src/dev/rollczi/litecommands/meta/Meta.java b/litecommands-core/src/dev/rollczi/litecommands/meta/Meta.java
index 1b30e2c2f..7d2923457 100644
--- a/litecommands-core/src/dev/rollczi/litecommands/meta/Meta.java
+++ b/litecommands-core/src/dev/rollczi/litecommands/meta/Meta.java
@@ -7,6 +7,7 @@
import java.util.Collection;
import java.util.Collections;
import java.util.List;
+import java.util.function.UnaryOperator;
@SuppressWarnings("rawtypes")
public interface Meta {
@@ -37,6 +38,12 @@ default MetaListEditor listEditor(MetaKey> key) {
return new MetaListEditor<>(this.get(key), this, key);
}
+ default Meta list(MetaKey> key, UnaryOperator> operator) {
+ MetaListEditor editor = listEditor(key);
+
+ return operator.apply(editor).apply();
+ }
+
Meta apply(Meta meta);
Meta copy();