Skip to content

Commit

Permalink
Merge pull request #12 from TheNextLvl-net/4.0.0
Browse files Browse the repository at this point in the history
4.0.0
  • Loading branch information
NonSwag authored Jul 29, 2024
2 parents f76239e + 744afdf commit 7bb2d05
Show file tree
Hide file tree
Showing 71 changed files with 1,761 additions and 1,303 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,4 @@ jobs:
- name: Build with Gradle
uses: gradle/actions/setup-gradle@v3
with:
arguments: shadowJar
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
path: plugin/build/libs/*
if-no-files-found: error
arguments: shadowJar
2 changes: 1 addition & 1 deletion api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group = "net.thenextlvl.commander"
version = "3.1.1"
version = "4.0.0"

repositories {
mavenCentral()
Expand Down
23 changes: 23 additions & 0 deletions api/src/main/java/net/thenextlvl/commander/CommandRegistry.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package net.thenextlvl.commander;

import java.util.Set;

public interface CommandRegistry {
Set<String> hiddenCommands();

Set<String> unregisteredCommands();

boolean hide(String command);

boolean isHidden(String command);

boolean isUnregistered(String command);

boolean register(String command);

boolean reveal(String command);

boolean unregister(String command);

void unregisterCommands();
}
30 changes: 30 additions & 0 deletions api/src/main/java/net/thenextlvl/commander/Commander.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package net.thenextlvl.commander;

import core.annotation.MethodsReturnNotNullByDefault;
import core.i18n.file.ComponentBundle;

@MethodsReturnNotNullByDefault
public interface Commander {

/**
* Retrieves the ComponentBundle associated with the Commander.
*
* @return the ComponentBundle instance
*/
ComponentBundle bundle();

/**
* Retrieves the CommandRegistry instance associated with the Commander.
*
* @return the CommandRegistry instance
*/
CommandRegistry commandRegistry();

/**
* Get the permission override instance.
* This method returns a PermissionOverride instance, which is used to manipulate permissions for commands.
*
* @return the PermissionOverride instance
*/
PermissionOverride permissionOverride();
}
25 changes: 25 additions & 0 deletions api/src/main/java/net/thenextlvl/commander/PermissionOverride.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package net.thenextlvl.commander;

import org.jetbrains.annotations.Nullable;

import java.util.Map;

public interface PermissionOverride {
Map<String, @Nullable String> originalPermissions();

Map<String, @Nullable String> overrides();

@Nullable
String originalPermission(String command);

@Nullable
String permission(String command);

boolean isOverridden(String command);

boolean override(String command, @Nullable String permission);

boolean reset(String command);

void overridePermissions();
}
113 changes: 0 additions & 113 deletions api/src/main/java/net/thenextlvl/commander/api/CommandInfo.java

This file was deleted.

Loading

0 comments on commit 7bb2d05

Please sign in to comment.