-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from TheNextLvl-net/4.0.0
4.0.0
- Loading branch information
Showing
71 changed files
with
1,761 additions
and
1,303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
api/src/main/java/net/thenextlvl/commander/CommandRegistry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
25
api/src/main/java/net/thenextlvl/commander/PermissionOverride.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
113
api/src/main/java/net/thenextlvl/commander/api/CommandInfo.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.