mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
Extract permission method to ChatChannel
This commit is contained in:
3 files changed
+19
-10
No files matched your search
@@ -27,6 +27,7 @@ import net.draycia.carbon.api.util.ChatComponentRenderer;
|
||||
import net.kyori.adventure.audience.Audience;
|
||||
import net.kyori.adventure.key.Keyed;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
@@ -111,6 +112,16 @@ public interface ChatChannel extends Keyed, ChatComponentRenderer {
|
||||
*/
|
||||
List<String> commandAliases();
|
||||
|
||||
/**
|
||||
* The base permission players must have in order to use the channel.
|
||||
*
|
||||
* Null return means players do not need any permission.
|
||||
*
|
||||
* @return the permission required to use the channel, or null
|
||||
* @since 2.0.7
|
||||
*/
|
||||
@MonotonicNonNull String permission();
|
||||
|
||||
/**
|
||||
* Represents the result of a channel permission check.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user