diff --git a/bukkit/pom.xml b/bukkit/pom.xml
index 1260fb762..f69812c86 100644
--- a/bukkit/pom.xml
+++ b/bukkit/pom.xml
@@ -5,7 +5,7 @@
luckperms
me.lucko
- 1.0-SNAPSHOT
+ 1.1
4.0.0
diff --git a/bukkit/src/main/java/me/lucko/luckperms/CommandManagerBukkit.java b/bukkit/src/main/java/me/lucko/luckperms/CommandManagerBukkit.java
index 5f9e2f98e..8beecf5e8 100644
--- a/bukkit/src/main/java/me/lucko/luckperms/CommandManagerBukkit.java
+++ b/bukkit/src/main/java/me/lucko/luckperms/CommandManagerBukkit.java
@@ -18,7 +18,7 @@ class CommandManagerBukkit extends CommandManager implements CommandExecutor, Ta
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
- return onCommand(makeSender(sender), Arrays.asList(args));
+ return onCommand(makeSender(sender), label, Arrays.asList(args));
}
diff --git a/bukkit/src/main/java/me/lucko/luckperms/LPBukkitPlugin.java b/bukkit/src/main/java/me/lucko/luckperms/LPBukkitPlugin.java
index ad0740acd..a69064123 100644
--- a/bukkit/src/main/java/me/lucko/luckperms/LPBukkitPlugin.java
+++ b/bukkit/src/main/java/me/lucko/luckperms/LPBukkitPlugin.java
@@ -28,7 +28,7 @@ import java.util.stream.Collectors;
@Getter
public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin {
- public static final String VERSION = "v1.0";
+ public static final String VERSION = "v1.1";
private LPConfiguration configuration;
private UserManager userManager;
diff --git a/bukkit/src/main/resources/plugin.yml b/bukkit/src/main/resources/plugin.yml
index 3258b2d5f..ccd2a0701 100644
--- a/bukkit/src/main/resources/plugin.yml
+++ b/bukkit/src/main/resources/plugin.yml
@@ -1,6 +1,6 @@
name: LuckPerms
author: Luck
-version: 1.0
+version: 1.1
main: me.lucko.luckperms.LPBukkitPlugin
softdepend: [Vault]
description: A permissions plugin
diff --git a/bungee/pom.xml b/bungee/pom.xml
index 2f596b54e..03e8e02ab 100644
--- a/bungee/pom.xml
+++ b/bungee/pom.xml
@@ -5,7 +5,7 @@
luckperms
me.lucko
- 1.0-SNAPSHOT
+ 1.1
4.0.0
diff --git a/bungee/src/main/java/me/lucko/luckperms/LPBungeePlugin.java b/bungee/src/main/java/me/lucko/luckperms/LPBungeePlugin.java
index 1a0d496e2..2f8035dee 100644
--- a/bungee/src/main/java/me/lucko/luckperms/LPBungeePlugin.java
+++ b/bungee/src/main/java/me/lucko/luckperms/LPBungeePlugin.java
@@ -23,7 +23,7 @@ import java.util.stream.Collectors;
@Getter
public class LPBungeePlugin extends Plugin implements LuckPermsPlugin {
- public static final String VERSION = "v1.0";
+ public static final String VERSION = "v1.1";
private LPConfiguration configuration;
private UserManager userManager;
@@ -41,6 +41,9 @@ public class LPBungeePlugin extends Plugin implements LuckPermsPlugin {
// register commands
getProxy().getPluginManager().registerCommand(this, new MainCommand(new CommandManager(this)));
+ // disable the default Bungee /perms command so it gets handled by the Bukkit plugin
+ getProxy().getDisabledCommands().add("perms");
+
final String storageMethod = configuration.getStorageMethod();
if (storageMethod.equalsIgnoreCase("mysql")) {
diff --git a/bungee/src/main/java/me/lucko/luckperms/MainCommand.java b/bungee/src/main/java/me/lucko/luckperms/MainCommand.java
index 5f0ef15c0..fae809bf9 100644
--- a/bungee/src/main/java/me/lucko/luckperms/MainCommand.java
+++ b/bungee/src/main/java/me/lucko/luckperms/MainCommand.java
@@ -21,7 +21,7 @@ class MainCommand extends Command implements TabExecutor {
@Override
public void execute(CommandSender sender, String[] args) {
- manager.onCommand(makeSender(sender), Arrays.asList(args));
+ manager.onCommand(makeSender(sender), "bperms", Arrays.asList(args));
}
@Override
diff --git a/bungee/src/main/resources/plugin.yml b/bungee/src/main/resources/plugin.yml
index 9215088ea..27b742034 100644
--- a/bungee/src/main/resources/plugin.yml
+++ b/bungee/src/main/resources/plugin.yml
@@ -1,3 +1,5 @@
name: LuckPerms
+author: Luck
+version: 1.1
main: me.lucko.luckperms.LPBungeePlugin
-author: Luck
\ No newline at end of file
+description: A permissions plugin
\ No newline at end of file
diff --git a/common/pom.xml b/common/pom.xml
index 9a00fc81e..6393b7709 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -5,7 +5,7 @@
luckperms
me.lucko
- 1.0-SNAPSHOT
+ 1.1
4.0.0
diff --git a/common/src/main/java/me/lucko/luckperms/commands/CommandManager.java b/common/src/main/java/me/lucko/luckperms/commands/CommandManager.java
index 50b954474..ff9de86d0 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/CommandManager.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/CommandManager.java
@@ -91,36 +91,36 @@ public class CommandManager {
* @param args the arguments provided
* @return if the command was successful (hint: it always is :> )
*/
- public boolean onCommand(Sender sender, List args) {
+ public boolean onCommand(Sender sender, String label, List args) {
if (args.size() == 0) {
- sendCommandUsage(sender);
+ sendCommandUsage(sender, label);
return true;
}
Optional o = mainCommands.stream().filter(m -> m.getName().equalsIgnoreCase(args.get(0))).limit(1).findAny();
if (!o.isPresent()) {
- sendCommandUsage(sender);
+ sendCommandUsage(sender, label);
return true;
}
final MainCommand main = o.get();
if (!main.canUse(sender)) {
- sendCommandUsage(sender);
+ sendCommandUsage(sender, label);
return true;
}
if (main.getRequiredArgsLength() == 0) {
- main.execute(plugin, sender, null);
+ main.execute(plugin, sender, null, label);
return true;
}
if (args.size() == 1) {
- main.sendUsage(sender);
+ main.sendUsage(sender, label);
return true;
}
- main.execute(plugin, sender, new ArrayList<>(args.subList(1, args.size())));
+ main.execute(plugin, sender, new ArrayList<>(args.subList(1, args.size())), label);
return true;
}
@@ -155,11 +155,11 @@ public class CommandManager {
mainCommands.add(command);
}
- private void sendCommandUsage(Sender sender) {
+ private void sendCommandUsage(Sender sender, String label) {
Message.INFO_BRIEF.send(sender, plugin.getVersion());
mainCommands.stream()
.filter(c -> c.canUse(sender))
- .forEach(c -> Util.sendPluginMessage(sender, "&e-> &d" + c.getUsage()));
+ .forEach(c -> Util.sendPluginMessage(sender, "&e-> &d" + String.format(c.getUsage(), label)));
}
}
diff --git a/common/src/main/java/me/lucko/luckperms/commands/MainCommand.java b/common/src/main/java/me/lucko/luckperms/commands/MainCommand.java
index e520f586b..37c422d8b 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/MainCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/MainCommand.java
@@ -18,13 +18,13 @@ public abstract class MainCommand {
private final String usage;
private final int requiredArgsLength;
- protected abstract void execute(LuckPermsPlugin plugin, Sender sender, List args);
+ protected abstract void execute(LuckPermsPlugin plugin, Sender sender, List args, String label);
protected abstract List onTabComplete(Sender sender, List args, LuckPermsPlugin plugin);
public abstract List extends SubCommand> getSubCommands();
- protected void sendUsage(Sender sender) {
+ protected void sendUsage(Sender sender, String label) {
if (getSubCommands().isEmpty()) {
- Util.sendPluginMessage(sender, "&e-> &d" + getUsage());
+ Util.sendPluginMessage(sender, "&e-> &d" + String.format(getUsage(), label));
return;
}
@@ -33,7 +33,7 @@ public abstract class MainCommand {
Util.sendPluginMessage(sender, "&e" + getName() + " Sub Commands:");
for (SubCommand s : subs) {
- s.sendUsage(sender);
+ s.sendUsage(sender, label);
}
} else {
diff --git a/common/src/main/java/me/lucko/luckperms/commands/SubCommand.java b/common/src/main/java/me/lucko/luckperms/commands/SubCommand.java
index 2fc9c2509..9e2d87ed5 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/SubCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/SubCommand.java
@@ -51,8 +51,8 @@ public abstract class SubCommand {
return permission.isAuthorized(sender);
}
- public void sendUsage(Sender sender) {
- Util.sendPluginMessage(sender, "&e-> &d" + getUsage());
+ public void sendUsage(Sender sender, String label) {
+ Util.sendPluginMessage(sender, "&e-> &d" + String.format(getUsage(), label));
}
public List onTabComplete(Sender sender, List args, LuckPermsPlugin plugin) {
diff --git a/common/src/main/java/me/lucko/luckperms/commands/Util.java b/common/src/main/java/me/lucko/luckperms/commands/Util.java
index 2f3e07afb..6bf97b684 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/Util.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/Util.java
@@ -32,10 +32,6 @@ public class Util {
return new String(b);
}
- public static boolean startsWithIgnoreCase(String s, String startsWith) {
- return s.toLowerCase().startsWith(startsWith);
- }
-
public static void sendBoolean(Sender sender, String node, boolean b) {
if (b) {
sender.sendMessage(Util.color("&b" + node + ": &atrue"));
diff --git a/common/src/main/java/me/lucko/luckperms/commands/group/CreateGroupCommand.java b/common/src/main/java/me/lucko/luckperms/commands/group/CreateGroupCommand.java
index ffa6fe7ba..a7ef54d50 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/group/CreateGroupCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/group/CreateGroupCommand.java
@@ -13,13 +13,13 @@ import java.util.List;
public class CreateGroupCommand extends MainCommand {
public CreateGroupCommand() {
- super("CreateGroup", "/perms creategroup ", 1);
+ super("CreateGroup", "/%s creategroup ", 1);
}
@Override
- protected void execute(LuckPermsPlugin plugin, Sender sender, List args) {
+ protected void execute(LuckPermsPlugin plugin, Sender sender, List args, String label) {
if (args.size() == 0) {
- sendUsage(sender);
+ sendUsage(sender, label);
return;
}
diff --git a/common/src/main/java/me/lucko/luckperms/commands/group/DeleteGroupCommand.java b/common/src/main/java/me/lucko/luckperms/commands/group/DeleteGroupCommand.java
index 38e2ab7e4..583ac0951 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/group/DeleteGroupCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/group/DeleteGroupCommand.java
@@ -15,13 +15,13 @@ import java.util.stream.Collectors;
public class DeleteGroupCommand extends MainCommand {
public DeleteGroupCommand() {
- super("DeleteGroup", "/perms deletegroup ", 1);
+ super("DeleteGroup", "/%s deletegroup ", 1);
}
@Override
- protected void execute(LuckPermsPlugin plugin, Sender sender, List args) {
+ protected void execute(LuckPermsPlugin plugin, Sender sender, List args, String label) {
if (args.size() == 0) {
- sendUsage(sender);
+ sendUsage(sender, label);
return;
}
diff --git a/common/src/main/java/me/lucko/luckperms/commands/group/GroupMainCommand.java b/common/src/main/java/me/lucko/luckperms/commands/group/GroupMainCommand.java
index 83cf2ad24..d2a82b89c 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/group/GroupMainCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/group/GroupMainCommand.java
@@ -17,13 +17,13 @@ public class GroupMainCommand extends MainCommand {
private final List subCommands = new ArrayList<>();
public GroupMainCommand() {
- super("Group", "/perms group ", 2);
+ super("Group", "/%s group ", 2);
}
@Override
- protected void execute(LuckPermsPlugin plugin, Sender sender, List args) {
+ protected void execute(LuckPermsPlugin plugin, Sender sender, List args, String label) {
if (args.size() < 2) {
- sendUsage(sender);
+ sendUsage(sender, label);
return;
}
@@ -46,7 +46,7 @@ public class GroupMainCommand extends MainCommand {
}
if (sub.isArgLengthInvalid(strippedArgs.size())) {
- sub.sendUsage(sender);
+ sub.sendUsage(sender, label);
return;
}
@@ -63,7 +63,7 @@ public class GroupMainCommand extends MainCommand {
return;
}
- sub.execute(plugin, sender, group, strippedArgs);
+ sub.execute(plugin, sender, group, strippedArgs, label);
});
}
diff --git a/common/src/main/java/me/lucko/luckperms/commands/group/GroupSubCommand.java b/common/src/main/java/me/lucko/luckperms/commands/group/GroupSubCommand.java
index d2a765ae1..03988fed4 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/group/GroupSubCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/group/GroupSubCommand.java
@@ -14,7 +14,7 @@ public abstract class GroupSubCommand extends SubCommand {
super(name, description, usage, permission);
}
- protected abstract void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args);
+ protected abstract void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args, String label);
protected void saveGroup(Group group, Sender sender, LuckPermsPlugin plugin) {
plugin.getDatastore().saveGroup(group, success -> {
diff --git a/common/src/main/java/me/lucko/luckperms/commands/group/ListGroupsCommand.java b/common/src/main/java/me/lucko/luckperms/commands/group/ListGroupsCommand.java
index 3421a47bb..0a0dcc415 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/group/ListGroupsCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/group/ListGroupsCommand.java
@@ -14,11 +14,11 @@ import java.util.List;
public class ListGroupsCommand extends MainCommand {
public ListGroupsCommand() {
- super("ListGroups", "/perms listgroups", 0);
+ super("ListGroups", "/%s listgroups", 0);
}
@Override
- protected void execute(LuckPermsPlugin plugin, Sender sender, List args) {
+ protected void execute(LuckPermsPlugin plugin, Sender sender, List args, String label) {
plugin.getDatastore().loadAllGroups(success -> {
if (!success) {
Message.GROUPS_LOAD_ERROR.send(sender);
diff --git a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupClearCommand.java b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupClearCommand.java
index d6d53e5d1..27d60a0b1 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupClearCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupClearCommand.java
@@ -11,11 +11,11 @@ import java.util.List;
public class GroupClearCommand extends GroupSubCommand {
public GroupClearCommand() {
- super("clear", "Clears a groups permissions", "/perms group clear", Permission.GROUP_CLEAR);
+ super("clear", "Clears a groups permissions", "/%s group clear", Permission.GROUP_CLEAR);
}
@Override
- protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args) {
+ protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args, String label) {
group.clearNodes();
Message.CLEAR_SUCCESS.send(sender, group.getName());
diff --git a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupHasPermCommand.java b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupHasPermCommand.java
index 7eb1181f8..6b1b032fc 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupHasPermCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupHasPermCommand.java
@@ -12,11 +12,11 @@ import java.util.List;
public class GroupHasPermCommand extends GroupSubCommand {
public GroupHasPermCommand() {
super("haspermission", "Checks to see if a group has a certain permission node",
- "/perms group haspermission [server]", Permission.GROUP_HASPERMISSION);
+ "/%s group haspermission [server]", Permission.GROUP_HASPERMISSION);
}
@Override
- protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args) {
+ protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args, String label) {
if (args.size() == 2) {
Util.sendBoolean(sender, args.get(0), group.hasPermission(args.get(0), true, args.get(1).toLowerCase()));
} else {
diff --git a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupInfoCommand.java b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupInfoCommand.java
index 4fb3f2989..87feb0155 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupInfoCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupInfoCommand.java
@@ -11,12 +11,12 @@ import java.util.List;
public class GroupInfoCommand extends GroupSubCommand {
public GroupInfoCommand() {
- super("info", "Gives info about the group", "/perms group info", Permission.GROUP_INFO);
+ super("info", "Gives info about the group", "/%s group info", Permission.GROUP_INFO);
}
@Override
- protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args) {
- Message.GROUP_INFO.send(sender, group.getName(), group.getNodes().keySet().size(), group.getName());
+ protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args, String label) {
+ Message.GROUP_INFO.send(sender, group.getName(), group.getNodes().keySet().size(), label, group.getName());
}
@Override
diff --git a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupInheritsPermCommand.java b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupInheritsPermCommand.java
index 67c9f04d3..05f6bc50e 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupInheritsPermCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupInheritsPermCommand.java
@@ -12,11 +12,11 @@ import java.util.List;
public class GroupInheritsPermCommand extends GroupSubCommand {
public GroupInheritsPermCommand() {
super("inheritspermission", "Checks to see if a group inherits a certain permission node",
- "/perms group inheritspermission [server]", Permission.GROUP_INHERITSPERMISSION);
+ "/%s group inheritspermission [server]", Permission.GROUP_INHERITSPERMISSION);
}
@Override
- protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args) {
+ protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args, String label) {
if (args.size() == 2) {
Util.sendBoolean(sender, args.get(0), group.inheritsPermission(args.get(0), true, args.get(1).toLowerCase()));
} else {
diff --git a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupListNodesCommand.java b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupListNodesCommand.java
index 82177ef61..0023c4fb6 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupListNodesCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupListNodesCommand.java
@@ -12,12 +12,12 @@ import java.util.List;
public class GroupListNodesCommand extends GroupSubCommand {
public GroupListNodesCommand() {
- super("listnodes", "Lists the permission nodes the group has", "/perms group listnodes",
+ super("listnodes", "Lists the permission nodes the group has", "/%s group listnodes",
Permission.GROUP_LISTNODES);
}
@Override
- protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args) {
+ protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args, String label) {
Message.LISTNODES.send(sender, group.getName(), Util.nodesToString(group.getNodes()));
}
diff --git a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupSetInheritCommand.java b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupSetInheritCommand.java
index 326749733..355ea9270 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupSetInheritCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupSetInheritCommand.java
@@ -13,11 +13,11 @@ import java.util.List;
public class GroupSetInheritCommand extends GroupSubCommand {
public GroupSetInheritCommand() {
super("setinherit", "Sets another group for this group to inherit permissions from",
- "/perms group setinherit [server]", Permission.GROUP_SETINHERIT);
+ "/%s group setinherit [server]", Permission.GROUP_SETINHERIT);
}
@Override
- protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args) {
+ protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args, String label) {
String groupName = args.get(0).toLowerCase();
plugin.getDatastore().loadGroup(groupName, success -> {
diff --git a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupSetPermissionCommand.java b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupSetPermissionCommand.java
index fec369ade..b7731f8a0 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupSetPermissionCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupSetPermissionCommand.java
@@ -13,17 +13,17 @@ import java.util.List;
public class GroupSetPermissionCommand extends GroupSubCommand {
public GroupSetPermissionCommand() {
- super("set", "Sets a permission for a group", "/perms group set [server]",
+ super("set", "Sets a permission for a group", "/%s group set [server]",
Permission.GROUP_SETPERMISSION);
}
@Override
- protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args) {
+ protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args, String label) {
String node = args.get(0);
String bool = args.get(1).toLowerCase();
if (node.contains("/")) {
- sendUsage(sender);
+ sendUsage(sender, label);
return;
}
@@ -33,7 +33,7 @@ public class GroupSetPermissionCommand extends GroupSubCommand {
}
if (!bool.equalsIgnoreCase("true") && !bool.equalsIgnoreCase("false")) {
- sendUsage(sender);
+ sendUsage(sender, label);
return;
}
diff --git a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupShowTracksCommand.java b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupShowTracksCommand.java
index 885a1c273..3454ac7ed 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupShowTracksCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupShowTracksCommand.java
@@ -14,11 +14,11 @@ import java.util.stream.Collectors;
public class GroupShowTracksCommand extends GroupSubCommand {
public GroupShowTracksCommand() {
- super("showtracks", "Lists the tracks that this group features on", "/perms group showtracks", Permission.GROUP_SHOWTRACKS);
+ super("showtracks", "Lists the tracks that this group features on", "/%s group showtracks", Permission.GROUP_SHOWTRACKS);
}
@Override
- protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args) {
+ protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args, String label) {
plugin.getDatastore().loadAllTracks(success -> {
if (!success) {
Message.TRACKS_LOAD_ERROR.send(sender);
diff --git a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupUnSetPermissionCommand.java b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupUnSetPermissionCommand.java
index 7b3294fda..7a674874e 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupUnSetPermissionCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupUnSetPermissionCommand.java
@@ -14,15 +14,15 @@ import java.util.List;
public class GroupUnSetPermissionCommand extends GroupSubCommand {
public GroupUnSetPermissionCommand() {
super("unset", "Unsets a permission for a group",
- "/perms group unset [server]", Permission.GROUP_UNSETPERMISSION);
+ "/%s group unset [server]", Permission.GROUP_UNSETPERMISSION);
}
@Override
- protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args) {
+ protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args, String label) {
String node = args.get(0);
if (node.contains("/")) {
- sendUsage(sender);
+ sendUsage(sender, label);
return;
}
diff --git a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupUnsetInheritCommand.java b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupUnsetInheritCommand.java
index dc6845b9b..2160ed57f 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupUnsetInheritCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/group/subcommands/GroupUnsetInheritCommand.java
@@ -13,11 +13,11 @@ import java.util.List;
public class GroupUnsetInheritCommand extends GroupSubCommand {
public GroupUnsetInheritCommand() {
super("unsetinherit", "Unsets another group for this group to inherit permissions from",
- "/perms group unsetinherit [server]", Permission.GROUP_UNSETINHERIT);
+ "/%s group unsetinherit [server]", Permission.GROUP_UNSETINHERIT);
}
@Override
- protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args) {
+ protected void execute(LuckPermsPlugin plugin, Sender sender, Group group, List args, String label) {
String groupName = args.get(0).toLowerCase();
try {
diff --git a/common/src/main/java/me/lucko/luckperms/commands/misc/DebugCommand.java b/common/src/main/java/me/lucko/luckperms/commands/misc/DebugCommand.java
index 8ff344bd5..64f3452bc 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/misc/DebugCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/misc/DebugCommand.java
@@ -12,11 +12,11 @@ import java.util.List;
public class DebugCommand extends MainCommand {
public DebugCommand() {
- super("Debug", "/perms debug", 0);
+ super("Debug", "/%s debug", 0);
}
@Override
- protected void execute(LuckPermsPlugin plugin, Sender sender, List args) {
+ protected void execute(LuckPermsPlugin plugin, Sender sender, List args, String label) {
Message.DEBUG.send(sender, plugin.getPlayerCount(), plugin.getUserManager().getUsers().size(),
plugin.getGroupManager().getGroups().size(), plugin.getTrackManager().getTracks().size()
);
diff --git a/common/src/main/java/me/lucko/luckperms/commands/misc/InfoCommand.java b/common/src/main/java/me/lucko/luckperms/commands/misc/InfoCommand.java
index 7f5ce063b..2f56886b9 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/misc/InfoCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/misc/InfoCommand.java
@@ -12,11 +12,11 @@ import java.util.List;
public class InfoCommand extends MainCommand {
public InfoCommand() {
- super("Info", "/perms info", 0);
+ super("Info", "/%s info", 0);
}
@Override
- protected void execute(LuckPermsPlugin plugin, Sender sender, List args) {
+ protected void execute(LuckPermsPlugin plugin, Sender sender, List args, String label) {
Message.INFO.send(sender, plugin.getVersion(), plugin.getDatastore().getName());
}
diff --git a/common/src/main/java/me/lucko/luckperms/commands/misc/SyncCommand.java b/common/src/main/java/me/lucko/luckperms/commands/misc/SyncCommand.java
index 27d921cd8..180bf1470 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/misc/SyncCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/misc/SyncCommand.java
@@ -12,11 +12,11 @@ import java.util.List;
public class SyncCommand extends MainCommand {
public SyncCommand() {
- super("Sync", "/perms sync", 0);
+ super("Sync", "/%s sync", 0);
}
@Override
- protected void execute(LuckPermsPlugin plugin, Sender sender, List args) {
+ protected void execute(LuckPermsPlugin plugin, Sender sender, List args, String label) {
Message.UPDATE_TASK_RUN.send(sender);
plugin.runUpdateTask();
}
diff --git a/common/src/main/java/me/lucko/luckperms/commands/track/CreateTrackCommand.java b/common/src/main/java/me/lucko/luckperms/commands/track/CreateTrackCommand.java
index 82f6e25e6..071d24c4b 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/track/CreateTrackCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/track/CreateTrackCommand.java
@@ -13,13 +13,13 @@ import java.util.List;
public class CreateTrackCommand extends MainCommand {
public CreateTrackCommand() {
- super("CreateTrack", "/perms createtrack