mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-19 18:49:38 +00:00
Initial commit
This commit is contained in:
commit
dc1e06ebce
70 files changed
+4044
No files matched your search
@@ -0,0 +1,35 @@
|
||||
package me.lucko.luckperms.commands;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
public abstract class SubCommand {
|
||||
|
||||
@Getter
|
||||
private final String name;
|
||||
|
||||
@Getter
|
||||
private final String description;
|
||||
|
||||
@Getter
|
||||
private final String usage;
|
||||
|
||||
@Getter
|
||||
private final String permission;
|
||||
|
||||
public SubCommand(String name, String description, String usage, String permission) {
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.usage = usage;
|
||||
this.permission = permission;
|
||||
}
|
||||
|
||||
public boolean isAuthorized(Sender sender) {
|
||||
return sender.hasPermission(permission);
|
||||
}
|
||||
|
||||
public void sendUsage(Sender sender) {
|
||||
Util.sendPluginMessage(sender, "&e-> &d" + getUsage());
|
||||
}
|
||||
|
||||
public abstract boolean isArgLengthInvalid(int argLength);
|
||||
}
|
||||
Reference in new issue
Block a user