diff --git a/README.md b/README.md index 6d05bf395..ac2243f24 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Helpful links: - [Support Discord](https://discord.gg/6cUhkj6uZJ) - [GitHub issues](https://github.com/Rollczi/LiteCommands/issues) -- [Example (Modern 2.3.3)](https://github.com/Rollczi/LiteCommands/tree/master/examples/bukkit) +- [Example (Modern 2.3.4)](https://github.com/Rollczi/LiteCommands/tree/master/examples/bukkit) - [Docs (Legacy 1.7.2)](https://docs.rollczi.dev/) ### Panda Repository (Maven or Gradle) ❤️ @@ -25,11 +25,11 @@ Framework Core dev.rollczi.litecommands core - 2.3.3 + 2.3.4 ``` ```groovy -implementation 'dev.rollczi.litecommands:core:2.3.3' +implementation 'dev.rollczi.litecommands:core:2.3.4' ``` ### First Simple Command @@ -64,11 +64,11 @@ Add this to your dependencies if you want use ready-made implementation for velo dev.rollczi.litecommands velocity - 2.3.3 + 2.3.4 ``` ```groovy -implementation 'dev.rollczi.litecommands:velocity:2.3.3' +implementation 'dev.rollczi.litecommands:velocity:2.3.4' ``` #### All extensions: diff --git a/build.gradle.kts b/build.gradle.kts index 94104902f..0e519b6b6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,7 +14,7 @@ plugins { allprojects { group = "dev.rollczi.litecommands" - version = "2.3.3" + version = "2.3.4" apply(plugin = "java-library") apply(plugin = "maven-publish") diff --git a/examples/bukkit/build.gradle.kts b/examples/bukkit/build.gradle.kts index 211d6d85a..300a3aa21 100644 --- a/examples/bukkit/build.gradle.kts +++ b/examples/bukkit/build.gradle.kts @@ -10,7 +10,7 @@ repositories { dependencies { compileOnly("org.spigotmc:spigot-api:1.19-R0.1-SNAPSHOT") - // implementation("dev.rollczi.litecommands:bukkit:2.3.3") // <-- uncomment in your project + // implementation("dev.rollczi.litecommands:bukkit:2.3.4") // <-- uncomment in your project implementation(project(":litecommands-bukkit")) // don't use this line in your build.gradle testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.1") diff --git a/litecommands-bukkit-adventure/README.md b/litecommands-bukkit-adventure/README.md index 96bb16b6b..f1ba88452 100644 --- a/litecommands-bukkit-adventure/README.md +++ b/litecommands-bukkit-adventure/README.md @@ -4,10 +4,10 @@ Maven dev.rollczi.litecommands bukkit-adventure - 2.3.3 + 2.3.4 ``` Gradle ```groovy -implementation 'dev.rollczi.litecommands:bukkit-adventure:2.3.3' +implementation 'dev.rollczi.litecommands:bukkit-adventure:2.3.4' ``` diff --git a/litecommands-bukkit/README.md b/litecommands-bukkit/README.md index 8bc697163..b3633f5a7 100644 --- a/litecommands-bukkit/README.md +++ b/litecommands-bukkit/README.md @@ -4,12 +4,12 @@ Maven dev.rollczi.litecommands bukkit - 2.3.3 + 2.3.4 ``` Gradle ```groovy -implementation 'dev.rollczi.litecommands:bukkit:2.3.3' +implementation 'dev.rollczi.litecommands:bukkit:2.3.4' ``` #### Examples: diff --git a/litecommands-bungee/README.md b/litecommands-bungee/README.md index c601335b2..ac72ff3c7 100644 --- a/litecommands-bungee/README.md +++ b/litecommands-bungee/README.md @@ -4,12 +4,12 @@ Maven dev.rollczi.litecommands bungee - 2.3.3 + 2.3.4 ``` Gradle ```groovy -implementation 'dev.rollczi.litecommands:bungee:2.3.3' +implementation 'dev.rollczi.litecommands:bungee:2.3.4' ``` #### Examples: diff --git a/litecommands-core/src/main/java/dev/rollczi/litecommands/implementation/LiteCommandSection.java b/litecommands-core/src/main/java/dev/rollczi/litecommands/implementation/LiteCommandSection.java index 3452f08f2..bfc4d111a 100644 --- a/litecommands-core/src/main/java/dev/rollczi/litecommands/implementation/LiteCommandSection.java +++ b/litecommands-core/src/main/java/dev/rollczi/litecommands/implementation/LiteCommandSection.java @@ -103,6 +103,13 @@ public ExecuteResult execute(Invocation invocation) { @Override public SuggestionMerger findSuggestion(Invocation invocation, int route) { SuggestionMerger suggestionMerger = SuggestionMerger.empty(invocation); + LiteSender sender = invocation.sender(); + + for (String permission : this.meta.getPermissions()) { + if (!sender.hasPermission(permission)) { + return suggestionMerger; + } + } if (invocation.arguments().length == route) { return suggestionMerger.appendRoot(this.suggestion()); @@ -110,16 +117,7 @@ public SuggestionMerger findSuggestion(Invocation invocation, int route) int routeAbove = route + 1; - root: for (CommandSection section : this.childSections) { - for (String permission : section.meta().getPermissions()) { - LiteSender sender = invocation.sender(); - - if (!sender.hasPermission(permission)) { - continue root; - } - } - SuggesterResult result = section.extractSuggestions(route, invocation.toLite()); if (result.isFailure()) { diff --git a/litecommands-velocity/README.md b/litecommands-velocity/README.md index 58aff5c69..c89287dd1 100644 --- a/litecommands-velocity/README.md +++ b/litecommands-velocity/README.md @@ -4,12 +4,12 @@ Maven dev.rollczi.litecommands velocity - 2.3.3 + 2.3.4 ``` Gradle ```groovy -implementation 'dev.rollczi.litecommands:velocity:2.3.3' +implementation 'dev.rollczi.litecommands:velocity:2.3.4' ``` #### Examples: