File tree Expand file tree Collapse file tree 8 files changed +22
-24
lines changed
litecommands-bukkit-adventure
litecommands-core/src/main/java/dev/rollczi/litecommands/implementation Expand file tree Collapse file tree 8 files changed +22
-24
lines changed Original file line number Diff line number Diff line change 66Helpful links:
77- [ Support Discord] ( https://discord.gg/6cUhkj6uZJ )
88- [ GitHub issues] ( https://github.com/Rollczi/LiteCommands/issues )
9- - [ Example (Modern 2.3.3 )] ( https://github.com/Rollczi/LiteCommands/tree/master/examples/bukkit )
9+ - [ Example (Modern 2.3.4 )] ( https://github.com/Rollczi/LiteCommands/tree/master/examples/bukkit )
1010- [ Docs (Legacy 1.7.2)] ( https://docs.rollczi.dev/ )
1111
1212### Panda Repository (Maven or Gradle) ❤️
@@ -25,11 +25,11 @@ Framework Core
2525<dependency >
2626 <groupId >dev.rollczi.litecommands</groupId >
2727 <artifactId >core</artifactId >
28- <version >2.3.3 </version >
28+ <version >2.3.4 </version >
2929</dependency >
3030```
3131``` groovy
32- implementation 'dev.rollczi.litecommands:core:2.3.3 '
32+ implementation 'dev.rollczi.litecommands:core:2.3.4 '
3333```
3434
3535### First Simple Command
@@ -64,11 +64,11 @@ Add this to your dependencies if you want use ready-made implementation for velo
6464<dependency >
6565 <groupId >dev.rollczi.litecommands</groupId >
6666 <artifactId >velocity</artifactId >
67- <version >2.3.3 </version >
67+ <version >2.3.4 </version >
6868</dependency >
6969```
7070``` groovy
71- implementation 'dev.rollczi.litecommands:velocity:2.3.3 '
71+ implementation 'dev.rollczi.litecommands:velocity:2.3.4 '
7272```
7373
7474#### All extensions:
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ plugins {
1414
1515allprojects {
1616 group = " dev.rollczi.litecommands"
17- version = " 2.3.3 "
17+ version = " 2.3.4 "
1818
1919 apply (plugin = " java-library" )
2020 apply (plugin = " maven-publish" )
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ repositories {
1010
1111dependencies {
1212 compileOnly(" org.spigotmc:spigot-api:1.19-R0.1-SNAPSHOT" )
13- // implementation("dev.rollczi.litecommands:bukkit:2.3.3 ") // <-- uncomment in your project
13+ // implementation("dev.rollczi.litecommands:bukkit:2.3.4 ") // <-- uncomment in your project
1414 implementation(project(" :litecommands-bukkit" )) // don't use this line in your build.gradle
1515
1616 testImplementation(" org.junit.jupiter:junit-jupiter-api:5.8.1" )
Original file line number Diff line number Diff line change 44<dependency >
55 <groupId >dev.rollczi.litecommands</groupId >
66 <artifactId >bukkit-adventure</artifactId >
7- <version >2.3.3 </version >
7+ <version >2.3.4 </version >
88</dependency >
99```
1010Gradle
1111``` groovy
12- implementation 'dev.rollczi.litecommands:bukkit-adventure:2.3.3 '
12+ implementation 'dev.rollczi.litecommands:bukkit-adventure:2.3.4 '
1313```
Original file line number Diff line number Diff line change 44<dependency >
55 <groupId >dev.rollczi.litecommands</groupId >
66 <artifactId >bukkit</artifactId >
7- <version >2.3.3 </version >
7+ <version >2.3.4 </version >
88</dependency >
99```
1010Gradle
1111``` groovy
12- implementation 'dev.rollczi.litecommands:bukkit:2.3.3 '
12+ implementation 'dev.rollczi.litecommands:bukkit:2.3.4 '
1313```
1414
1515#### Examples:
Original file line number Diff line number Diff line change 44<dependency >
55 <groupId >dev.rollczi.litecommands</groupId >
66 <artifactId >bungee</artifactId >
7- <version >2.3.3 </version >
7+ <version >2.3.4 </version >
88</dependency >
99```
1010Gradle
1111``` groovy
12- implementation 'dev.rollczi.litecommands:bungee:2.3.3 '
12+ implementation 'dev.rollczi.litecommands:bungee:2.3.4 '
1313```
1414
1515#### Examples:
Original file line number Diff line number Diff line change @@ -103,23 +103,21 @@ public ExecuteResult execute(Invocation<SENDER> invocation) {
103103 @ Override
104104 public SuggestionMerger findSuggestion (Invocation <SENDER > invocation , int route ) {
105105 SuggestionMerger suggestionMerger = SuggestionMerger .empty (invocation );
106+ LiteSender sender = invocation .sender ();
107+
108+ for (String permission : this .meta .getPermissions ()) {
109+ if (!sender .hasPermission (permission )) {
110+ return suggestionMerger ;
111+ }
112+ }
106113
107114 if (invocation .arguments ().length == route ) {
108115 return suggestionMerger .appendRoot (this .suggestion ());
109116 }
110117
111118 int routeAbove = route + 1 ;
112119
113- root :
114120 for (CommandSection <SENDER > section : this .childSections ) {
115- for (String permission : section .meta ().getPermissions ()) {
116- LiteSender sender = invocation .sender ();
117-
118- if (!sender .hasPermission (permission )) {
119- continue root ;
120- }
121- }
122-
123121 SuggesterResult result = section .extractSuggestions (route , invocation .toLite ());
124122
125123 if (result .isFailure ()) {
Original file line number Diff line number Diff line change 44<dependency >
55 <groupId >dev.rollczi.litecommands</groupId >
66 <artifactId >velocity</artifactId >
7- <version >2.3.3 </version >
7+ <version >2.3.4 </version >
88</dependency >
99```
1010Gradle
1111``` groovy
12- implementation 'dev.rollczi.litecommands:velocity:2.3.3 '
12+ implementation 'dev.rollczi.litecommands:velocity:2.3.4 '
1313```
1414
1515#### Examples:
You can’t perform that action at this time.
0 commit comments