Skip to content

Commit

Permalink
Fix cover tabs by permissions and Release 2.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Rollczi committed Jul 8, 2022
1 parent 9f79b7c commit 062fa8c
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 24 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) ❤️
Expand All @@ -25,11 +25,11 @@ Framework Core
<dependency>
<groupId>dev.rollczi.litecommands</groupId>
<artifactId>core</artifactId>
<version>2.3.3</version>
<version>2.3.4</version>
</dependency>
```
```groovy
implementation 'dev.rollczi.litecommands:core:2.3.3'
implementation 'dev.rollczi.litecommands:core:2.3.4'
```

### First Simple Command
Expand Down Expand Up @@ -64,11 +64,11 @@ Add this to your dependencies if you want use ready-made implementation for velo
<dependency>
<groupId>dev.rollczi.litecommands</groupId>
<artifactId>velocity</artifactId>
<version>2.3.3</version>
<version>2.3.4</version>
</dependency>
```
```groovy
implementation 'dev.rollczi.litecommands:velocity:2.3.3'
implementation 'dev.rollczi.litecommands:velocity:2.3.4'
```

#### All extensions:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion examples/bukkit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions litecommands-bukkit-adventure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Maven
<dependency>
<groupId>dev.rollczi.litecommands</groupId>
<artifactId>bukkit-adventure</artifactId>
<version>2.3.3</version>
<version>2.3.4</version>
</dependency>
```
Gradle
```groovy
implementation 'dev.rollczi.litecommands:bukkit-adventure:2.3.3'
implementation 'dev.rollczi.litecommands:bukkit-adventure:2.3.4'
```
4 changes: 2 additions & 2 deletions litecommands-bukkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ Maven
<dependency>
<groupId>dev.rollczi.litecommands</groupId>
<artifactId>bukkit</artifactId>
<version>2.3.3</version>
<version>2.3.4</version>
</dependency>
```
Gradle
```groovy
implementation 'dev.rollczi.litecommands:bukkit:2.3.3'
implementation 'dev.rollczi.litecommands:bukkit:2.3.4'
```

#### Examples:
Expand Down
4 changes: 2 additions & 2 deletions litecommands-bungee/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ Maven
<dependency>
<groupId>dev.rollczi.litecommands</groupId>
<artifactId>bungee</artifactId>
<version>2.3.3</version>
<version>2.3.4</version>
</dependency>
```
Gradle
```groovy
implementation 'dev.rollczi.litecommands:bungee:2.3.3'
implementation 'dev.rollczi.litecommands:bungee:2.3.4'
```

#### Examples:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,23 +103,21 @@ public ExecuteResult execute(Invocation<SENDER> invocation) {
@Override
public SuggestionMerger findSuggestion(Invocation<SENDER> 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());
}

int routeAbove = route + 1;

root:
for (CommandSection<SENDER> 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()) {
Expand Down
4 changes: 2 additions & 2 deletions litecommands-velocity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ Maven
<dependency>
<groupId>dev.rollczi.litecommands</groupId>
<artifactId>velocity</artifactId>
<version>2.3.3</version>
<version>2.3.4</version>
</dependency>
```
Gradle
```groovy
implementation 'dev.rollczi.litecommands:velocity:2.3.3'
implementation 'dev.rollczi.litecommands:velocity:2.3.4'
```

#### Examples:
Expand Down

0 comments on commit 062fa8c

Please sign in to comment.