diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationBPermissions.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationBPermissions.java index 7923f70e..5a1b4176 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationBPermissions.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationBPermissions.java @@ -32,8 +32,8 @@ import de.bananaco.bpermissions.api.WorldManager; import me.lucko.luckperms.api.event.cause.CreationCause; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; -import me.lucko.luckperms.common.commands.migration.MigrationUtils; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; +import me.lucko.luckperms.common.commands.impl.migration.MigrationUtils; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.core.NodeFactory; import me.lucko.luckperms.common.core.model.PermissionHolder; diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationGroupManager.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationGroupManager.java index 16b5371c..856599ba 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationGroupManager.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationGroupManager.java @@ -27,8 +27,8 @@ import me.lucko.luckperms.api.event.cause.CreationCause; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; -import me.lucko.luckperms.common.commands.migration.MigrationUtils; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; +import me.lucko.luckperms.common.commands.impl.migration.MigrationUtils; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Permission; import me.lucko.luckperms.common.core.NodeFactory; diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationPermissionsEx.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationPermissionsEx.java index 7343adaa..ac9f5a9c 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationPermissionsEx.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationPermissionsEx.java @@ -25,8 +25,8 @@ package me.lucko.luckperms.bukkit.migration; import me.lucko.luckperms.api.event.cause.CreationCause; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; -import me.lucko.luckperms.common.commands.migration.MigrationUtils; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; +import me.lucko.luckperms.common.commands.impl.migration.MigrationUtils; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Permission; import me.lucko.luckperms.common.core.NodeFactory; diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationPowerfulPerms.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationPowerfulPerms.java index 71387065..c70f7a0f 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationPowerfulPerms.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationPowerfulPerms.java @@ -35,8 +35,8 @@ import me.lucko.luckperms.api.event.cause.CreationCause; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; -import me.lucko.luckperms.common.commands.migration.MigrationUtils; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; +import me.lucko.luckperms.common.commands.impl.migration.MigrationUtils; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.config.ConfigKeys; import me.lucko.luckperms.common.core.NodeFactory; diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationZPermissions.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationZPermissions.java index c449fcfc..4bef499f 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationZPermissions.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationZPermissions.java @@ -25,8 +25,8 @@ package me.lucko.luckperms.bukkit.migration; import me.lucko.luckperms.api.event.cause.CreationCause; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; -import me.lucko.luckperms.common.commands.migration.MigrationUtils; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; +import me.lucko.luckperms.common.commands.impl.migration.MigrationUtils; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Permission; import me.lucko.luckperms.common.core.NodeFactory; diff --git a/bungee/src/main/java/me/lucko/luckperms/bungee/migration/MigrationBungeePerms.java b/bungee/src/main/java/me/lucko/luckperms/bungee/migration/MigrationBungeePerms.java index dab89cf4..1648d7bf 100644 --- a/bungee/src/main/java/me/lucko/luckperms/bungee/migration/MigrationBungeePerms.java +++ b/bungee/src/main/java/me/lucko/luckperms/bungee/migration/MigrationBungeePerms.java @@ -25,8 +25,8 @@ package me.lucko.luckperms.bungee.migration; import me.lucko.luckperms.api.event.cause.CreationCause; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; -import me.lucko.luckperms.common.commands.migration.MigrationUtils; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; +import me.lucko.luckperms.common.commands.impl.migration.MigrationUtils; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Permission; import me.lucko.luckperms.common.core.NodeFactory; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/BaseCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/BaseCommand.java deleted file mode 100644 index bd21826e..00000000 --- a/common/src/main/java/me/lucko/luckperms/common/commands/BaseCommand.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2016 Lucko (Luck) - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package me.lucko.luckperms.common.commands; - -import me.lucko.luckperms.common.constants.Permission; - -import java.util.List; -import java.util.function.Predicate; - -public abstract class BaseCommand extends Command { - - public BaseCommand(String name, String description, Permission permission, Predicate argumentCheck, List args, List> children) { - super(name, description, permission, argumentCheck, args, children); - } - - public abstract String getUsage(); - - public boolean shouldDisplay() { - return true; - } - -} diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/CommandManager.java b/common/src/main/java/me/lucko/luckperms/common/commands/CommandManager.java index d41279c5..4115c016 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/CommandManager.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/CommandManager.java @@ -26,29 +26,30 @@ import lombok.Getter; import com.google.common.collect.ImmutableList; -import me.lucko.luckperms.common.commands.group.CreateGroup; -import me.lucko.luckperms.common.commands.group.DeleteGroup; -import me.lucko.luckperms.common.commands.group.GroupMainCommand; -import me.lucko.luckperms.common.commands.group.ListGroups; -import me.lucko.luckperms.common.commands.log.LogMainCommand; -import me.lucko.luckperms.common.commands.migration.MigrationMainCommand; -import me.lucko.luckperms.common.commands.misc.CheckCommand; -import me.lucko.luckperms.common.commands.misc.ExportCommand; -import me.lucko.luckperms.common.commands.misc.ImportCommand; -import me.lucko.luckperms.common.commands.misc.InfoCommand; -import me.lucko.luckperms.common.commands.misc.NetworkSyncCommand; -import me.lucko.luckperms.common.commands.misc.ReloadConfigCommand; -import me.lucko.luckperms.common.commands.misc.SearchCommand; -import me.lucko.luckperms.common.commands.misc.SyncCommand; -import me.lucko.luckperms.common.commands.misc.TreeCommand; -import me.lucko.luckperms.common.commands.misc.VerboseCommand; +import me.lucko.luckperms.common.commands.abstraction.Command; +import me.lucko.luckperms.common.commands.impl.group.CreateGroup; +import me.lucko.luckperms.common.commands.impl.group.DeleteGroup; +import me.lucko.luckperms.common.commands.impl.group.GroupMainCommand; +import me.lucko.luckperms.common.commands.impl.group.ListGroups; +import me.lucko.luckperms.common.commands.impl.log.LogMainCommand; +import me.lucko.luckperms.common.commands.impl.migration.MigrationMainCommand; +import me.lucko.luckperms.common.commands.impl.misc.CheckCommand; +import me.lucko.luckperms.common.commands.impl.misc.ExportCommand; +import me.lucko.luckperms.common.commands.impl.misc.ImportCommand; +import me.lucko.luckperms.common.commands.impl.misc.InfoCommand; +import me.lucko.luckperms.common.commands.impl.misc.NetworkSyncCommand; +import me.lucko.luckperms.common.commands.impl.misc.ReloadConfigCommand; +import me.lucko.luckperms.common.commands.impl.misc.SearchCommand; +import me.lucko.luckperms.common.commands.impl.misc.SyncCommand; +import me.lucko.luckperms.common.commands.impl.misc.TreeCommand; +import me.lucko.luckperms.common.commands.impl.misc.VerboseCommand; +import me.lucko.luckperms.common.commands.impl.track.CreateTrack; +import me.lucko.luckperms.common.commands.impl.track.DeleteTrack; +import me.lucko.luckperms.common.commands.impl.track.ListTracks; +import me.lucko.luckperms.common.commands.impl.track.TrackMainCommand; +import me.lucko.luckperms.common.commands.impl.user.UserMainCommand; +import me.lucko.luckperms.common.commands.impl.usersbulkedit.UsersBulkEditMainCommand; import me.lucko.luckperms.common.commands.sender.Sender; -import me.lucko.luckperms.common.commands.track.CreateTrack; -import me.lucko.luckperms.common.commands.track.DeleteTrack; -import me.lucko.luckperms.common.commands.track.ListTracks; -import me.lucko.luckperms.common.commands.track.TrackMainCommand; -import me.lucko.luckperms.common.commands.user.UserMainCommand; -import me.lucko.luckperms.common.commands.usersbulkedit.UsersBulkEditMainCommand; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; @@ -75,14 +76,14 @@ public class CommandManager { private final ExecutorService executor; @Getter - private final List mainCommands; + private final List mainCommands; public CommandManager(LuckPermsPlugin plugin) { this.plugin = plugin; this.executor = Executors.newSingleThreadExecutor(); - ImmutableList.Builder l = ImmutableList.builder(); - l.add(new UserMainCommand()) + mainCommands = ImmutableList.builder() + .add(new UserMainCommand()) .add(new GroupMainCommand()) .add(new TrackMainCommand()) .addAll(plugin.getExtraCommands()) @@ -104,9 +105,8 @@ public class CommandManager { .add(new ListGroups()) .add(new CreateTrack()) .add(new DeleteTrack()) - .add(new ListTracks()); - - mainCommands = l.build(); + .add(new ListTracks()) + .build(); } /** @@ -129,7 +129,7 @@ public class CommandManager { } // Look for the main command. - Optional o = mainCommands.stream() + Optional o = mainCommands.stream() .filter(m -> m.getName().equalsIgnoreCase(args.get(0))) .limit(1) .findAny(); @@ -226,19 +226,23 @@ public class CommandManager { @SuppressWarnings("unchecked") String permission = (String) c.getPermission().map(p -> ((Permission) p).getExample()).orElse("None"); - FancyMessage msg = new FancyMessage("> ").color(ChatColor.getByChar('3')).then().text(String.format(c.getUsage(), label)).color(ChatColor.getByChar('a')) + FancyMessage msg = new FancyMessage("> ").color(c('3')).then().text(String.format(c.getUsage(), label)).color(c('a')) .formattedTooltip( - new FancyMessage("Command: ").color(ChatColor.getByChar('b')).then().text(c.getName()).color(ChatColor.getByChar('2')), - new FancyMessage("Description: ").color(ChatColor.getByChar('b')).then().text(c.getDescription()).color(ChatColor.getByChar('2')), - new FancyMessage("Usage: ").color(ChatColor.getByChar('b')).then().text(String.format(c.getUsage(), label)).color(ChatColor.getByChar('2')), - new FancyMessage("Permission: ").color(ChatColor.getByChar('b')).then().text(permission).color(ChatColor.getByChar('2')), + new FancyMessage("Command: ").color(c('b')).then().text(c.getName()).color(c('2')), + new FancyMessage("Description: ").color(c('b')).then().text(c.getDescription()).color(c('2')), + new FancyMessage("Usage: ").color(c('b')).then().text(String.format(c.getUsage(), label)).color(c('2')), + new FancyMessage("Permission: ").color(c('b')).then().text(permission).color(c('2')), new FancyMessage(" "), - new FancyMessage("Click to auto-complete.").color(ChatColor.getByChar('7')) + new FancyMessage("Click to auto-complete.").color(c('7')) ) .suggest(String.format(c.getUsage(), label)); sender.sendMessage(msg); }); } + + private static ChatColor c(char c) { + return ChatColor.getByChar(c); + } public static CommandResult handleException(CommandException e, Sender sender, String label, Command command) { if (e instanceof ArgumentUtils.ArgumentException) { @@ -392,9 +396,9 @@ public class CommandManager { // Provide lazy set rewrite boolean lazySet = ( args.size() >= 6 && - args.get(2).equalsIgnoreCase("permission") && - args.get(3).toLowerCase().startsWith("set") && - (args.get(5).equalsIgnoreCase("none") || args.get(5).equalsIgnoreCase("0")) + args.get(2).equalsIgnoreCase("permission") && + args.get(3).toLowerCase().startsWith("set") && + (args.get(5).equalsIgnoreCase("none") || args.get(5).equalsIgnoreCase("0")) ); if (lazySet) { diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/Command.java b/common/src/main/java/me/lucko/luckperms/common/commands/abstraction/Command.java similarity index 58% rename from common/src/main/java/me/lucko/luckperms/common/commands/Command.java rename to common/src/main/java/me/lucko/luckperms/common/commands/abstraction/Command.java index a05c029f..e7b4e40e 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/Command.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/abstraction/Command.java @@ -20,12 +20,15 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands; +package me.lucko.luckperms.common.commands.abstraction; import lombok.Getter; import com.google.common.collect.ImmutableList; +import me.lucko.luckperms.common.commands.Arg; +import me.lucko.luckperms.common.commands.CommandException; +import me.lucko.luckperms.common.commands.CommandResult; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Permission; import me.lucko.luckperms.common.plugin.LuckPermsPlugin; @@ -35,24 +38,46 @@ import java.util.List; import java.util.Optional; import java.util.function.Predicate; +/** + * An abstract command class + * + * @param the type required by the {@link #execute(LuckPermsPlugin, Sender, Object, List, String)} method of this command + * @param the type of any child commands + */ public abstract class Command { + /** + * The name of the command. Should be properly capitalised. + */ @Getter private final String name; + /** + * A brief description of this command + */ @Getter private final String description; - // Could be null + /** + * The permission required to use this command. Nullable. + */ private final Permission permission; + /** + * A predicate used for testing the size of the arguments list passed to this command + */ @Getter private final Predicate argumentCheck; - // Could be null + /** + * A list of arguments required for the command. These are just here for informational purposes, and aren't used + * for argument validation. + */ private final List args; - // Could be null + /** + * Child commands. Nullable. + */ private final List> children; public Command(String name, String description, Permission permission, Predicate argumentCheck, List args, List> children) { @@ -78,14 +103,56 @@ public abstract class Command { return Collections.emptyList(); } + /** + * Sends a brief command usage message to the Sender. + * If this command has child commands, the children are listed. Otherwise, a basic usage message is sent. + * + * @param sender the sender to send the usage to + * @param label the label used when executing the command + */ public abstract void sendUsage(Sender sender, String label); + /** + * Sends a detailed command usage message to the Sender. + * If this command has child commands, nothing is sent. Otherwise, a detailed messaging containing a description + * and argument usage is sent. + * + * @param sender the sender to send the usage to + * @param label the label used when executing the command + */ public abstract void sendDetailedUsage(Sender sender, String label); + /** + * Returns true if the sender is authorised to use this command + * + * Commands with children are likely to override this method to check for permissions based upon whether + * a sender has access to any sub commands. + * + * @param sender the sender + * @return true if the sender has permission to use this command + */ public boolean isAuthorized(Sender sender) { return permission == null || permission.isAuthorized(sender); } + /** + * Returns if this command should be displayed in command listings, or "hidden" + * + * @return if this command should be displayed in command listings, or "hidden" + */ + public boolean shouldDisplay() { + return true; + } + + /** + * Returns the usage of this command. Will only return a non empty result for main commands. + * + * @return the usage of this command. + */ + public String getUsage() { + return ""; + } + public Optional getPermission() { return Optional.ofNullable(permission); } diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/MainCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/abstraction/MainCommand.java similarity index 91% rename from common/src/main/java/me/lucko/luckperms/common/commands/MainCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/abstraction/MainCommand.java index 313ca2b7..c449ebf0 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/MainCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/abstraction/MainCommand.java @@ -20,10 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands; +package me.lucko.luckperms.common.commands.abstraction; import lombok.Getter; +import me.lucko.luckperms.common.commands.CommandException; +import me.lucko.luckperms.common.commands.CommandManager; +import me.lucko.luckperms.common.commands.CommandResult; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; @@ -36,7 +39,7 @@ import java.util.List; import java.util.Optional; import java.util.stream.Collectors; -public abstract class MainCommand extends BaseCommand { +public abstract class MainCommand extends Command { @Getter private final String usage; @@ -55,7 +58,7 @@ public abstract class MainCommand extends BaseCommand { return CommandResult.INVALID_ARGS; } - Optional> o = getSubCommands().stream() + Optional> o = getChildren().get().stream() .filter(s -> s.getName().equalsIgnoreCase(args.get(minArgs - 1))) .limit(1) .findAny(); @@ -112,7 +115,7 @@ public abstract class MainCommand extends BaseCommand { .collect(Collectors.toList()); } - final List> subs = getSubCommands().stream() + final List> subs = getChildren().get().stream() .filter(s -> s.isAuthorized(sender)) .collect(Collectors.toList()); @@ -149,7 +152,7 @@ public abstract class MainCommand extends BaseCommand { @Override public void sendUsage(Sender sender, String label) { - List subs = getSubCommands().stream() + List subs = getChildren().get().stream() .filter(s -> s.isAuthorized(sender)) .collect(Collectors.toList()); @@ -172,19 +175,11 @@ public abstract class MainCommand extends BaseCommand { @Override public boolean isAuthorized(Sender sender) { - return getSubCommands().stream().filter(sc -> sc.isAuthorized(sender)).count() != 0; + return getChildren().get().stream().filter(sc -> sc.isAuthorized(sender)).count() != 0; } - @SuppressWarnings("DeprecatedIsStillUsed") - @Deprecated @Override public Optional>> getChildren() { return super.getChildren(); } - - - @SuppressWarnings("deprecation") - public List> getSubCommands() { - return getChildren().get(); - } } diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/SharedMainCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/abstraction/SharedMainCommand.java similarity index 93% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/SharedMainCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/abstraction/SharedMainCommand.java index 32ded48b..2b583a66 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/SharedMainCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/abstraction/SharedMainCommand.java @@ -20,11 +20,10 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic; +package me.lucko.luckperms.common.commands.abstraction; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.Util; @@ -39,46 +38,18 @@ import java.util.List; import java.util.Optional; import java.util.stream.Collectors; +/** + * A shared main command. Shared meaning it can apply to both users and groups. + * This extends sub command as they're actually sub commands of the main user/group commands. + * @param + */ public class SharedMainCommand extends SubCommand { - private static CommandResult handleException(CommandException e, Sender sender, SharedSubCommand command) { - if (e instanceof ArgumentUtils.ArgumentException) { - if (e instanceof ArgumentUtils.DetailedUsageException) { - command.sendDetailedUsage(sender); - return CommandResult.INVALID_ARGS; - } - - if (e instanceof ArgumentUtils.UseInheritException) { - Message.USE_INHERIT_COMMAND.send(sender); - return CommandResult.INVALID_ARGS; - } - - if (e instanceof ArgumentUtils.InvalidServerException) { - Message.SERVER_INVALID_ENTRY.send(sender); - return CommandResult.INVALID_ARGS; - } - - if (e instanceof ArgumentUtils.PastDateException) { - Message.PAST_DATE_ERROR.send(sender); - return CommandResult.INVALID_ARGS; - } - - if (e instanceof ArgumentUtils.InvalidDateException) { - Message.ILLEGAL_DATE_ERROR.send(sender, ((ArgumentUtils.InvalidDateException) e).getInvalidDate()); - return CommandResult.INVALID_ARGS; - } - - if (e instanceof ArgumentUtils.InvalidPriorityException) { - Message.META_INVALID_PRIORITY.send(sender, ((ArgumentUtils.InvalidPriorityException) e).getInvalidPriority()); - return CommandResult.INVALID_ARGS; - } - } - - // Not something we can catch. - e.printStackTrace(); - return CommandResult.FAILURE; - } private final List secondaryCommands; + + /** + * If this instance of the shared command is targeting a user. Otherwise, it targets a group. + */ private boolean user; public SharedMainCommand(String name, String description, boolean user, List secondaryCommands) { @@ -162,12 +133,7 @@ public class SharedMainCommand extends SubCommand @Override public boolean isAuthorized(Sender sender) { - for (SharedSubCommand subCommand : secondaryCommands) { - if (subCommand.isAuthorized(sender, user)) { - return true; - } - } - return false; + return secondaryCommands.stream().filter(sc -> sc.isAuthorized(sender, user)).count() != 0; } private void sendUsageDetailed(Sender sender, boolean user, String label) { @@ -190,4 +156,42 @@ public class SharedMainCommand extends SubCommand Message.COMMAND_NO_PERMISSION.send(sender); } } + + private static CommandResult handleException(CommandException e, Sender sender, SharedSubCommand command) { + if (e instanceof ArgumentUtils.ArgumentException) { + if (e instanceof ArgumentUtils.DetailedUsageException) { + command.sendDetailedUsage(sender); + return CommandResult.INVALID_ARGS; + } + + if (e instanceof ArgumentUtils.UseInheritException) { + Message.USE_INHERIT_COMMAND.send(sender); + return CommandResult.INVALID_ARGS; + } + + if (e instanceof ArgumentUtils.InvalidServerException) { + Message.SERVER_INVALID_ENTRY.send(sender); + return CommandResult.INVALID_ARGS; + } + + if (e instanceof ArgumentUtils.PastDateException) { + Message.PAST_DATE_ERROR.send(sender); + return CommandResult.INVALID_ARGS; + } + + if (e instanceof ArgumentUtils.InvalidDateException) { + Message.ILLEGAL_DATE_ERROR.send(sender, ((ArgumentUtils.InvalidDateException) e).getInvalidDate()); + return CommandResult.INVALID_ARGS; + } + + if (e instanceof ArgumentUtils.InvalidPriorityException) { + Message.META_INVALID_PRIORITY.send(sender, ((ArgumentUtils.InvalidPriorityException) e).getInvalidPriority()); + return CommandResult.INVALID_ARGS; + } + } + + // Not something we can catch. + e.printStackTrace(); + return CommandResult.FAILURE; + } } diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/SharedSubCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/abstraction/SharedSubCommand.java similarity index 95% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/SharedSubCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/abstraction/SharedSubCommand.java index bfaba257..f3525cbe 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/SharedSubCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/abstraction/SharedSubCommand.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic; +package me.lucko.luckperms.common.commands.abstraction; import lombok.AllArgsConstructor; import lombok.Getter; @@ -30,7 +30,6 @@ import com.google.common.collect.ImmutableList; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Permission; @@ -43,39 +42,30 @@ import java.util.Collections; import java.util.List; import java.util.function.Predicate; +/** + * A sub command which can be be applied to both groups and users. + * This doesn't extend the other Command or SubCommand classes to avoid generics hell. + */ @Getter @AllArgsConstructor public abstract class SharedSubCommand { - protected static void save(PermissionHolder holder, Sender sender, LuckPermsPlugin plugin) { - if (holder instanceof User) { - User user = ((User) holder); - SubCommand.save(user, sender, plugin); - return; - } - - if (holder instanceof Group) { - Group group = ((Group) holder); - SubCommand.save(group, sender, plugin); - return; - } - - throw new IllegalArgumentException(); - } - /** * The name of the sub command */ private final String name; + /** * A brief description of what the sub command does */ private final String description; + /** * The permission needed to use this command */ private final Permission userPermission; private final Permission groupPermission; + /** * Predicate to test if the argument length given is invalid */ @@ -115,4 +105,20 @@ public abstract class SharedSubCommand { return user ? userPermission.isAuthorized(sender) : groupPermission.isAuthorized(sender); } + protected static void save(PermissionHolder holder, Sender sender, LuckPermsPlugin plugin) { + if (holder instanceof User) { + User user = ((User) holder); + SubCommand.save(user, sender, plugin); + return; + } + + if (holder instanceof Group) { + Group group = ((Group) holder); + SubCommand.save(group, sender, plugin); + return; + } + + throw new IllegalArgumentException(); + } + } diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/SingleCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/abstraction/SingleCommand.java similarity index 89% rename from common/src/main/java/me/lucko/luckperms/common/commands/SingleCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/abstraction/SingleCommand.java index 1eba4e7c..b7de3562 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/SingleCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/abstraction/SingleCommand.java @@ -20,10 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands; +package me.lucko.luckperms.common.commands.abstraction; import lombok.Getter; +import me.lucko.luckperms.common.commands.Arg; +import me.lucko.luckperms.common.commands.CommandException; +import me.lucko.luckperms.common.commands.CommandResult; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Permission; @@ -32,7 +35,10 @@ import me.lucko.luckperms.common.plugin.LuckPermsPlugin; import java.util.List; import java.util.function.Predicate; -public abstract class SingleCommand extends BaseCommand { +/** + * Represents a single "main" command (one without any children) + */ +public abstract class SingleCommand extends Command { @Getter private final String usage; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/SubCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/abstraction/SubCommand.java similarity index 95% rename from common/src/main/java/me/lucko/luckperms/common/commands/SubCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/abstraction/SubCommand.java index 358d59f8..9ecc408f 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/SubCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/abstraction/SubCommand.java @@ -20,12 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands; +package me.lucko.luckperms.common.commands.abstraction; import lombok.Getter; import com.google.common.base.Splitter; +import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; @@ -51,6 +52,42 @@ import java.util.stream.Collectors; @Getter public abstract class SubCommand extends Command { + public SubCommand(String name, String description, Permission permission, Predicate argumentCheck, List args) { + super(name, description, permission, argumentCheck, args); + } + + /** + * Send the command usage to a sender + * + * @param sender the sender to send the usage to + */ + @Override + public void sendUsage(Sender sender, String label) { + StringBuilder sb = new StringBuilder(); + if (getArgs().isPresent()) { + sb.append("&3 - &7"); + for (Arg arg : getArgs().get()) { + sb.append(arg.asPrettyString()).append(" "); + } + } + + Util.sendPluginMessage(sender, "&3> &a" + getName().toLowerCase() + sb.toString()); + } + + @Override + public void sendDetailedUsage(Sender sender, String label) { + Util.sendPluginMessage(sender, "&3&lCommand Usage &3- &b" + getName()); + Util.sendPluginMessage(sender, "&b> &7" + getDescription()); + if (getArgs().isPresent()) { + Util.sendPluginMessage(sender, "&3Arguments:"); + for (Arg arg : getArgs().get()) { + Util.sendPluginMessage(sender, "&b- " + arg.asPrettyString() + "&3 -> &7" + arg.getDescription()); + } + } + } + + /* Utility methods used by #tabComplete and #execute implementations in sub classes */ + public static List getGroupTabComplete(List args, LuckPermsPlugin plugin) { return getTabComplete(new ArrayList<>(plugin.getGroupManager().getAll().keySet()), args); } @@ -67,13 +104,6 @@ public abstract class SubCommand extends Command { } } - - /* - * ---------------------------------------------------------------------------------- - * Utility methods used by #tabComplete and #execute implementations in sub classes - * ---------------------------------------------------------------------------------- - */ - public static List getPermissionTabComplete(List args, PermissionVault cache) { if (args.size() <= 1) { if (args.isEmpty() || args.get(0).equals("")) { @@ -167,38 +197,4 @@ public abstract class SubCommand extends Command { Message.TRACK_SAVE_ERROR.send(sender); } } - - public SubCommand(String name, String description, Permission permission, Predicate argumentCheck, List args) { - super(name, description, permission, argumentCheck, args); - } - - /** - * Send the command usage to a sender - * - * @param sender the sender to send the usage to - */ - @Override - public void sendUsage(Sender sender, String label) { - StringBuilder sb = new StringBuilder(); - if (getArgs().isPresent()) { - sb.append("&3 - &7"); - for (Arg arg : getArgs().get()) { - sb.append(arg.asPrettyString()).append(" "); - } - } - - Util.sendPluginMessage(sender, "&3> &a" + getName().toLowerCase() + sb.toString()); - } - - @Override - public void sendDetailedUsage(Sender sender, String label) { - Util.sendPluginMessage(sender, "&3&lCommand Usage &3- &b" + getName()); - Util.sendPluginMessage(sender, "&b> &7" + getDescription()); - if (getArgs().isPresent()) { - Util.sendPluginMessage(sender, "&3Arguments:"); - for (Arg arg : getArgs().get()) { - Util.sendPluginMessage(sender, "&b- " + arg.asPrettyString() + "&3 -> &7" + arg.getDescription()); - } - } - } } diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/CommandMeta.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/CommandMeta.java similarity index 91% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/CommandMeta.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/CommandMeta.java index d7465627..ea1e8c15 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/CommandMeta.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/CommandMeta.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.meta; +package me.lucko.luckperms.common.commands.impl.generic.meta; import com.google.common.collect.ImmutableList; -import me.lucko.luckperms.common.commands.generic.SharedMainCommand; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedMainCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.core.model.PermissionHolder; public class CommandMeta extends SharedMainCommand { diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddPrefix.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaAddPrefix.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddPrefix.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaAddPrefix.java index 4b3dda7b..24eeeb9f 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddPrefix.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaAddPrefix.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.meta; +package me.lucko.luckperms.common.commands.impl.generic.meta; import me.lucko.luckperms.api.MetaUtils; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddSuffix.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaAddSuffix.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddSuffix.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaAddSuffix.java index c345c30a..f265bf84 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddSuffix.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaAddSuffix.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.meta; +package me.lucko.luckperms.common.commands.impl.generic.meta; import me.lucko.luckperms.api.MetaUtils; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddTempPrefix.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaAddTempPrefix.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddTempPrefix.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaAddTempPrefix.java index 43f6898c..d2c1d45b 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddTempPrefix.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaAddTempPrefix.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.meta; +package me.lucko.luckperms.common.commands.impl.generic.meta; import me.lucko.luckperms.api.MetaUtils; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddTempSuffix.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaAddTempSuffix.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddTempSuffix.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaAddTempSuffix.java index f3610667..2128b408 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddTempSuffix.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaAddTempSuffix.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.meta; +package me.lucko.luckperms.common.commands.impl.generic.meta; import me.lucko.luckperms.api.MetaUtils; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaClear.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaClear.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaClear.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaClear.java index f0be099e..4f37d886 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaClear.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaClear.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.meta; +package me.lucko.luckperms.common.commands.impl.generic.meta; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaInfo.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaInfo.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaInfo.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaInfo.java index 1e725377..e1ebf629 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaInfo.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaInfo.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.meta; +package me.lucko.luckperms.common.commands.impl.generic.meta; import me.lucko.luckperms.api.Contexts; import me.lucko.luckperms.api.LocalizedNode; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemovePrefix.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaRemovePrefix.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemovePrefix.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaRemovePrefix.java index 0d56f160..76b273a8 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemovePrefix.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaRemovePrefix.java @@ -20,14 +20,14 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.meta; +package me.lucko.luckperms.common.commands.impl.generic.meta; import me.lucko.luckperms.api.MetaUtils; import me.lucko.luckperms.api.Node; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveSuffix.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaRemoveSuffix.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveSuffix.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaRemoveSuffix.java index 28229a35..0895c052 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveSuffix.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaRemoveSuffix.java @@ -20,14 +20,14 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.meta; +package me.lucko.luckperms.common.commands.impl.generic.meta; import me.lucko.luckperms.api.MetaUtils; import me.lucko.luckperms.api.Node; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveTempPrefix.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaRemoveTempPrefix.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveTempPrefix.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaRemoveTempPrefix.java index ae5139d1..c6d28d2e 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveTempPrefix.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaRemoveTempPrefix.java @@ -20,14 +20,14 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.meta; +package me.lucko.luckperms.common.commands.impl.generic.meta; import me.lucko.luckperms.api.MetaUtils; import me.lucko.luckperms.api.Node; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveTempSuffix.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaRemoveTempSuffix.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveTempSuffix.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaRemoveTempSuffix.java index dbfded0b..d3bdb557 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveTempSuffix.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaRemoveTempSuffix.java @@ -20,14 +20,14 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.meta; +package me.lucko.luckperms.common.commands.impl.generic.meta; import me.lucko.luckperms.api.MetaUtils; import me.lucko.luckperms.api.Node; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaSet.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaSet.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaSet.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaSet.java index a960b721..699c2310 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaSet.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaSet.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.meta; +package me.lucko.luckperms.common.commands.impl.generic.meta; import me.lucko.luckperms.api.Node; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaSetTemp.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaSetTemp.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaSetTemp.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaSetTemp.java index 1a8bd9c3..78a18fff 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaSetTemp.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaSetTemp.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.meta; +package me.lucko.luckperms.common.commands.impl.generic.meta; import me.lucko.luckperms.api.Node; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaUnset.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaUnset.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaUnset.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaUnset.java index e12020af..91c8a61c 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaUnset.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaUnset.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.meta; +package me.lucko.luckperms.common.commands.impl.generic.meta; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaUnsetTemp.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaUnsetTemp.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaUnsetTemp.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaUnsetTemp.java index e4562348..188fae4c 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaUnsetTemp.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/meta/MetaUnsetTemp.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.meta; +package me.lucko.luckperms.common.commands.impl.generic.meta; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/other/HolderShowTracks.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/other/HolderShowTracks.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/other/HolderShowTracks.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/other/HolderShowTracks.java index 6aa49a06..3adcf9b2 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/other/HolderShowTracks.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/other/HolderShowTracks.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.other; +package me.lucko.luckperms.common.commands.impl.generic.other; import me.lucko.luckperms.api.Node; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/CommandParent.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/CommandParent.java similarity index 89% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/CommandParent.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/CommandParent.java index a92335d2..1a30a199 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/CommandParent.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/CommandParent.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.parent; +package me.lucko.luckperms.common.commands.impl.generic.parent; import com.google.common.collect.ImmutableList; -import me.lucko.luckperms.common.commands.generic.SharedMainCommand; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedMainCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.core.model.PermissionHolder; public class CommandParent extends SharedMainCommand { diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentAdd.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentAdd.java similarity index 95% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentAdd.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentAdd.java index 0f294d20..56fed814 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentAdd.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentAdd.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.parent; +package me.lucko.luckperms.common.commands.impl.generic.parent; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; @@ -41,7 +41,7 @@ import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import java.util.List; import java.util.stream.Collectors; -import static me.lucko.luckperms.common.commands.SubCommand.getGroupTabComplete; +import static me.lucko.luckperms.common.commands.abstraction.SubCommand.getGroupTabComplete; public class ParentAdd extends SharedSubCommand { public ParentAdd() { diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentAddTemp.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentAddTemp.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentAddTemp.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentAddTemp.java index 4c01a71e..dab19307 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentAddTemp.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentAddTemp.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.parent; +package me.lucko.luckperms.common.commands.impl.generic.parent; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; @@ -45,7 +45,7 @@ import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import java.util.List; import java.util.stream.Collectors; -import static me.lucko.luckperms.common.commands.SubCommand.getGroupTabComplete; +import static me.lucko.luckperms.common.commands.abstraction.SubCommand.getGroupTabComplete; public class ParentAddTemp extends SharedSubCommand { public ParentAddTemp() { diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentClear.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentClear.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentClear.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentClear.java index 1f8d5fd2..6869da59 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentClear.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentClear.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.parent; +package me.lucko.luckperms.common.commands.impl.generic.parent; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentInfo.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentInfo.java similarity index 94% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentInfo.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentInfo.java index dc4f7dc6..884f02ca 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentInfo.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentInfo.java @@ -20,11 +20,11 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.parent; +package me.lucko.luckperms.common.commands.impl.generic.parent; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentRemove.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentRemove.java similarity index 95% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentRemove.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentRemove.java index f6cb1bc8..5342a065 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentRemove.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentRemove.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.parent; +package me.lucko.luckperms.common.commands.impl.generic.parent; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; @@ -41,7 +41,7 @@ import me.lucko.luckperms.exceptions.ObjectLacksException; import java.util.List; import java.util.stream.Collectors; -import static me.lucko.luckperms.common.commands.SubCommand.getGroupTabComplete; +import static me.lucko.luckperms.common.commands.abstraction.SubCommand.getGroupTabComplete; public class ParentRemove extends SharedSubCommand { public ParentRemove() { diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentRemoveTemp.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentRemoveTemp.java similarity index 95% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentRemoveTemp.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentRemoveTemp.java index 7f359457..61c09d1d 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentRemoveTemp.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentRemoveTemp.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.parent; +package me.lucko.luckperms.common.commands.impl.generic.parent; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; @@ -40,7 +40,7 @@ import me.lucko.luckperms.exceptions.ObjectLacksException; import java.util.List; import java.util.stream.Collectors; -import static me.lucko.luckperms.common.commands.SubCommand.getGroupTabComplete; +import static me.lucko.luckperms.common.commands.abstraction.SubCommand.getGroupTabComplete; public class ParentRemoveTemp extends SharedSubCommand { public ParentRemoveTemp() { diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentSet.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentSet.java similarity index 95% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentSet.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentSet.java index d1bff3a9..498d3f9d 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentSet.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/parent/ParentSet.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.parent; +package me.lucko.luckperms.common.commands.impl.generic.parent; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; @@ -42,7 +42,7 @@ import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import java.util.List; import java.util.stream.Collectors; -import static me.lucko.luckperms.common.commands.SubCommand.getGroupTabComplete; +import static me.lucko.luckperms.common.commands.abstraction.SubCommand.getGroupTabComplete; public class ParentSet extends SharedSubCommand { public ParentSet() { diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/CommandPermission.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/CommandPermission.java similarity index 89% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/CommandPermission.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/CommandPermission.java index b2b2e5a2..205004da 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/CommandPermission.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/CommandPermission.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.permission; +package me.lucko.luckperms.common.commands.impl.generic.permission; import com.google.common.collect.ImmutableList; -import me.lucko.luckperms.common.commands.generic.SharedMainCommand; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedMainCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.core.model.PermissionHolder; public class CommandPermission extends SharedMainCommand { diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionCheck.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionCheck.java similarity index 93% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionCheck.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionCheck.java index 57e05e72..5bee3094 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionCheck.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionCheck.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.permission; +package me.lucko.luckperms.common.commands.impl.generic.permission; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; @@ -38,7 +38,7 @@ import me.lucko.luckperms.common.utils.Predicates; import java.util.List; -import static me.lucko.luckperms.common.commands.SubCommand.getPermissionTabComplete; +import static me.lucko.luckperms.common.commands.abstraction.SubCommand.getPermissionTabComplete; public class PermissionCheck extends SharedSubCommand { public PermissionCheck() { diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionCheckInherits.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionCheckInherits.java similarity index 94% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionCheckInherits.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionCheckInherits.java index 8823eb64..af38a374 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionCheckInherits.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionCheckInherits.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.permission; +package me.lucko.luckperms.common.commands.impl.generic.permission; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; @@ -39,7 +39,7 @@ import me.lucko.luckperms.common.utils.Predicates; import java.util.List; -import static me.lucko.luckperms.common.commands.SubCommand.getPermissionTabComplete; +import static me.lucko.luckperms.common.commands.abstraction.SubCommand.getPermissionTabComplete; public class PermissionCheckInherits extends SharedSubCommand { public PermissionCheckInherits() { diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionInfo.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionInfo.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionInfo.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionInfo.java index 221430be..e92393ef 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionInfo.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionInfo.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.permission; +package me.lucko.luckperms.common.commands.impl.generic.permission; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.Util; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionSet.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionSet.java similarity index 93% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionSet.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionSet.java index 10833594..7fd9dde0 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionSet.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionSet.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.permission; +package me.lucko.luckperms.common.commands.impl.generic.permission; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; @@ -40,8 +40,8 @@ import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import java.util.List; import java.util.stream.Collectors; -import static me.lucko.luckperms.common.commands.SubCommand.getBoolTabComplete; -import static me.lucko.luckperms.common.commands.SubCommand.getPermissionTabComplete; +import static me.lucko.luckperms.common.commands.abstraction.SubCommand.getBoolTabComplete; +import static me.lucko.luckperms.common.commands.abstraction.SubCommand.getPermissionTabComplete; public class PermissionSet extends SharedSubCommand { public PermissionSet() { diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionSetTemp.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionSetTemp.java similarity index 94% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionSetTemp.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionSetTemp.java index 37a74809..0d8b98fb 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionSetTemp.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionSetTemp.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.permission; +package me.lucko.luckperms.common.commands.impl.generic.permission; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; @@ -44,8 +44,8 @@ import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import java.util.List; import java.util.stream.Collectors; -import static me.lucko.luckperms.common.commands.SubCommand.getBoolTabComplete; -import static me.lucko.luckperms.common.commands.SubCommand.getPermissionTabComplete; +import static me.lucko.luckperms.common.commands.abstraction.SubCommand.getBoolTabComplete; +import static me.lucko.luckperms.common.commands.abstraction.SubCommand.getPermissionTabComplete; public class PermissionSetTemp extends SharedSubCommand { public PermissionSetTemp() { diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionUnset.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionUnset.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionUnset.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionUnset.java index 8767ef72..2c0b962b 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionUnset.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionUnset.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.permission; +package me.lucko.luckperms.common.commands.impl.generic.permission; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionUnsetTemp.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionUnsetTemp.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionUnsetTemp.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionUnsetTemp.java index 0b233723..9ed87f7f 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionUnsetTemp.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/generic/permission/PermissionUnsetTemp.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.generic.permission; +package me.lucko.luckperms.common.commands.impl.generic.permission; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.generic.SharedSubCommand; +import me.lucko.luckperms.common.commands.abstraction.SharedSubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/group/CreateGroup.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/CreateGroup.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/group/CreateGroup.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/group/CreateGroup.java index 5606188a..24972348 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/group/CreateGroup.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/CreateGroup.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.group; +package me.lucko.luckperms.common.commands.impl.group; import me.lucko.luckperms.api.event.cause.CreationCause; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SingleCommand; +import me.lucko.luckperms.common.commands.abstraction.SingleCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/group/DeleteGroup.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/DeleteGroup.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/group/DeleteGroup.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/group/DeleteGroup.java index ce8ce4cf..223714e9 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/group/DeleteGroup.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/DeleteGroup.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.group; +package me.lucko.luckperms.common.commands.impl.group; import me.lucko.luckperms.api.event.cause.DeletionCause; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SingleCommand; +import me.lucko.luckperms.common.commands.abstraction.SingleCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.config.ConfigKeys; import me.lucko.luckperms.common.constants.Message; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupBulkChange.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupBulkChange.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/group/GroupBulkChange.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupBulkChange.java index ff44a98d..5d038128 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupBulkChange.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupBulkChange.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.group; +package me.lucko.luckperms.common.commands.impl.group; import me.lucko.luckperms.api.Node; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupClear.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupClear.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/group/GroupClear.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupClear.java index 6ee8545b..931c0b74 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupClear.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupClear.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.group; +package me.lucko.luckperms.common.commands.impl.group; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupClone.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupClone.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/group/GroupClone.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupClone.java index 03bd2e3c..66cbe87e 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupClone.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupClone.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.group; +package me.lucko.luckperms.common.commands.impl.group; import me.lucko.luckperms.api.event.cause.CreationCause; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupInfo.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupInfo.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/group/GroupInfo.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupInfo.java index bf72faf2..fe845de1 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupInfo.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupInfo.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.group; +package me.lucko.luckperms.common.commands.impl.group; import me.lucko.luckperms.api.Node; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupMainCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupMainCommand.java similarity index 85% rename from common/src/main/java/me/lucko/luckperms/common/commands/group/GroupMainCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupMainCommand.java index 5937f297..f635bd26 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupMainCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupMainCommand.java @@ -20,16 +20,16 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.group; +package me.lucko.luckperms.common.commands.impl.group; import com.google.common.collect.ImmutableList; -import me.lucko.luckperms.common.commands.Command; -import me.lucko.luckperms.common.commands.MainCommand; -import me.lucko.luckperms.common.commands.generic.meta.CommandMeta; -import me.lucko.luckperms.common.commands.generic.other.HolderShowTracks; -import me.lucko.luckperms.common.commands.generic.parent.CommandParent; -import me.lucko.luckperms.common.commands.generic.permission.CommandPermission; +import me.lucko.luckperms.common.commands.abstraction.Command; +import me.lucko.luckperms.common.commands.abstraction.MainCommand; +import me.lucko.luckperms.common.commands.impl.generic.meta.CommandMeta; +import me.lucko.luckperms.common.commands.impl.generic.other.HolderShowTracks; +import me.lucko.luckperms.common.commands.impl.generic.parent.CommandParent; +import me.lucko.luckperms.common.commands.impl.generic.permission.CommandPermission; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.core.model.Group; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupRename.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupRename.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/group/GroupRename.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupRename.java index c00a056c..580917d7 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupRename.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupRename.java @@ -20,14 +20,14 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.group; +package me.lucko.luckperms.common.commands.impl.group; import me.lucko.luckperms.api.event.cause.CreationCause; import me.lucko.luckperms.api.event.cause.DeletionCause; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupSetWeight.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupSetWeight.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/group/GroupSetWeight.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupSetWeight.java index b33fc75f..21152dd4 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupSetWeight.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/GroupSetWeight.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.group; +package me.lucko.luckperms.common.commands.impl.group; import me.lucko.luckperms.api.Node; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.constants.Message; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/group/ListGroups.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/ListGroups.java similarity index 95% rename from common/src/main/java/me/lucko/luckperms/common/commands/group/ListGroups.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/group/ListGroups.java index 2b935562..0bd5a9fb 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/group/ListGroups.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/group/ListGroups.java @@ -20,10 +20,10 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.group; +package me.lucko.luckperms.common.commands.impl.group; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SingleCommand; +import me.lucko.luckperms.common.commands.abstraction.SingleCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/log/LogMainCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/log/LogMainCommand.java similarity index 81% rename from common/src/main/java/me/lucko/luckperms/common/commands/log/LogMainCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/log/LogMainCommand.java index 324e7d01..67e8850b 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/log/LogMainCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/log/LogMainCommand.java @@ -20,19 +20,19 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.log; +package me.lucko.luckperms.common.commands.impl.log; import com.google.common.collect.ImmutableList; -import me.lucko.luckperms.common.commands.Command; -import me.lucko.luckperms.common.commands.MainCommand; -import me.lucko.luckperms.common.commands.log.subcommands.LogExport; -import me.lucko.luckperms.common.commands.log.subcommands.LogGroupHistory; -import me.lucko.luckperms.common.commands.log.subcommands.LogNotify; -import me.lucko.luckperms.common.commands.log.subcommands.LogRecent; -import me.lucko.luckperms.common.commands.log.subcommands.LogSearch; -import me.lucko.luckperms.common.commands.log.subcommands.LogTrackHistory; -import me.lucko.luckperms.common.commands.log.subcommands.LogUserHistory; +import me.lucko.luckperms.common.commands.abstraction.Command; +import me.lucko.luckperms.common.commands.abstraction.MainCommand; +import me.lucko.luckperms.common.commands.impl.log.subcommands.LogExport; +import me.lucko.luckperms.common.commands.impl.log.subcommands.LogGroupHistory; +import me.lucko.luckperms.common.commands.impl.log.subcommands.LogNotify; +import me.lucko.luckperms.common.commands.impl.log.subcommands.LogRecent; +import me.lucko.luckperms.common.commands.impl.log.subcommands.LogSearch; +import me.lucko.luckperms.common.commands.impl.log.subcommands.LogTrackHistory; +import me.lucko.luckperms.common.commands.impl.log.subcommands.LogUserHistory; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.data.Log; @@ -80,7 +80,7 @@ public class LogMainCommand extends MainCommand { @Override public List tabComplete(LuckPermsPlugin plugin, Sender sender, List args) { - final List> subs = getSubCommands().stream() + final List> subs = getChildren().get().stream() .filter(s -> s.isAuthorized(sender)) .collect(Collectors.toList()); diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogExport.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogExport.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogExport.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogExport.java index 0e6c770d..1330ad31 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogExport.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogExport.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.log.subcommands; +package me.lucko.luckperms.common.commands.impl.log.subcommands; import me.lucko.luckperms.api.LogEntry; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogGroupHistory.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogGroupHistory.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogGroupHistory.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogGroupHistory.java index e1fed3cb..bd801868 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogGroupHistory.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogGroupHistory.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.log.subcommands; +package me.lucko.luckperms.common.commands.impl.log.subcommands; import me.lucko.luckperms.api.LogEntry; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogNotify.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogNotify.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogNotify.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogNotify.java index 9f083517..8cd50b6f 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogNotify.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogNotify.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.log.subcommands; +package me.lucko.luckperms.common.commands.impl.log.subcommands; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogRecent.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogRecent.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogRecent.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogRecent.java index b6034899..59ed5c8e 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogRecent.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogRecent.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.log.subcommands; +package me.lucko.luckperms.common.commands.impl.log.subcommands; import me.lucko.luckperms.api.LogEntry; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogSearch.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogSearch.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogSearch.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogSearch.java index 096db47d..5e5c585d 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogSearch.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogSearch.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.log.subcommands; +package me.lucko.luckperms.common.commands.impl.log.subcommands; import me.lucko.luckperms.api.LogEntry; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogTrackHistory.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogTrackHistory.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogTrackHistory.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogTrackHistory.java index 1fd596f1..e726c102 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogTrackHistory.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogTrackHistory.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.log.subcommands; +package me.lucko.luckperms.common.commands.impl.log.subcommands; import me.lucko.luckperms.api.LogEntry; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogUserHistory.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogUserHistory.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogUserHistory.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogUserHistory.java index 2e35d004..9ab6ba97 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/log/subcommands/LogUserHistory.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/log/subcommands/LogUserHistory.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.log.subcommands; +package me.lucko.luckperms.common.commands.impl.log.subcommands; import me.lucko.luckperms.api.LogEntry; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/migration/MigrationMainCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/migration/MigrationMainCommand.java similarity index 91% rename from common/src/main/java/me/lucko/luckperms/common/commands/migration/MigrationMainCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/migration/MigrationMainCommand.java index b1506abb..aaefab4e 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/migration/MigrationMainCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/migration/MigrationMainCommand.java @@ -20,15 +20,15 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.migration; +package me.lucko.luckperms.common.commands.impl.migration; import com.google.common.collect.ImmutableMap; -import me.lucko.luckperms.common.commands.Command; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.MainCommand; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.Command; +import me.lucko.luckperms.common.commands.abstraction.MainCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Permission; import me.lucko.luckperms.common.plugin.LuckPermsPlugin; @@ -53,20 +53,6 @@ public class MigrationMainCommand extends MainCommand { .put("io.github.djxy.permissionmanager.PermissionManager", "me.lucko.luckperms.sponge.migration.MigrationPermissionManager") .build(); - @SuppressWarnings("unchecked") - private static List> getAvailableCommands() { - List> l = new ArrayList<>(); - - for (Map.Entry plugin : PLUGINS.entrySet()) { - try { - Class.forName(plugin.getKey()); - l.add((SubCommand) Class.forName(plugin.getValue()).newInstance()); - } catch (Throwable ignored) {} - } - - return l.stream().collect(Collectors.toList()); - } - private List> commands = null; private boolean display = true; @@ -74,8 +60,6 @@ public class MigrationMainCommand extends MainCommand { super("Migration", "Migration commands", "/%s migration", 1, null); } - @SuppressWarnings({"deprecation", "DeprecatedIsStillUsed"}) - @Deprecated @Override public synchronized Optional>> getChildren() { if (commands == null) { @@ -96,11 +80,6 @@ public class MigrationMainCommand extends MainCommand { return Optional.of(commands); } - @SuppressWarnings("deprecation") - public List> getSubCommands() { - return getChildren().orElse(null); - } - @Override public boolean isAuthorized(Sender sender) { return sender.hasPermission(Permission.MIGRATION); @@ -108,10 +87,26 @@ public class MigrationMainCommand extends MainCommand { @Override public boolean shouldDisplay() { - getSubCommands(); + getChildren(); return display; } + @SuppressWarnings("unchecked") + private static List> getAvailableCommands() { + List> l = new ArrayList<>(); + + for (Map.Entry plugin : PLUGINS.entrySet()) { + try { + Class.forName(plugin.getKey()); + l.add((SubCommand) Class.forName(plugin.getValue()).newInstance()); + } catch (Throwable ignored) {} + } + + return l.stream().collect(Collectors.toList()); + } + + /* Dummy */ + @Override protected List getTargets(LuckPermsPlugin plugin) { return Collections.emptyList(); diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/migration/MigrationUtils.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/migration/MigrationUtils.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/migration/MigrationUtils.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/migration/MigrationUtils.java index 5845c067..2c7ffd25 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/migration/MigrationUtils.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/migration/MigrationUtils.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.migration; +package me.lucko.luckperms.common.commands.impl.migration; import lombok.experimental.UtilityClass; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/misc/CheckCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/CheckCommand.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/misc/CheckCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/CheckCommand.java index 86537a9a..12ffcfed 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/misc/CheckCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/CheckCommand.java @@ -20,14 +20,14 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.misc; +package me.lucko.luckperms.common.commands.impl.misc; import me.lucko.luckperms.api.Tristate; import me.lucko.luckperms.common.caching.UserCache; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SingleCommand; +import me.lucko.luckperms.common.commands.abstraction.SingleCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/misc/ExportCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/ExportCommand.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/misc/ExportCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/ExportCommand.java index 20bcb4ba..4d0f2b1c 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/misc/ExportCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/ExportCommand.java @@ -20,11 +20,11 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.misc; +package me.lucko.luckperms.common.commands.impl.misc; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SingleCommand; +import me.lucko.luckperms.common.commands.abstraction.SingleCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/misc/ImportCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/ImportCommand.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/misc/ImportCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/ImportCommand.java index d74b6aa6..5babcaa7 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/misc/ImportCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/ImportCommand.java @@ -20,11 +20,11 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.misc; +package me.lucko.luckperms.common.commands.impl.misc; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SingleCommand; +import me.lucko.luckperms.common.commands.abstraction.SingleCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/misc/InfoCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/InfoCommand.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/misc/InfoCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/InfoCommand.java index f04cf9e5..fc4ee9bc 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/misc/InfoCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/InfoCommand.java @@ -20,10 +20,10 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.misc; +package me.lucko.luckperms.common.commands.impl.misc; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SingleCommand; +import me.lucko.luckperms.common.commands.abstraction.SingleCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.config.ConfigKeys; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/misc/NetworkSyncCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/NetworkSyncCommand.java similarity index 95% rename from common/src/main/java/me/lucko/luckperms/common/commands/misc/NetworkSyncCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/NetworkSyncCommand.java index ecf6a428..bf228340 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/misc/NetworkSyncCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/NetworkSyncCommand.java @@ -20,10 +20,10 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.misc; +package me.lucko.luckperms.common.commands.impl.misc; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SingleCommand; +import me.lucko.luckperms.common.commands.abstraction.SingleCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/misc/ReloadConfigCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/ReloadConfigCommand.java similarity index 94% rename from common/src/main/java/me/lucko/luckperms/common/commands/misc/ReloadConfigCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/ReloadConfigCommand.java index c6061ff0..5ce105af 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/misc/ReloadConfigCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/ReloadConfigCommand.java @@ -20,11 +20,11 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.misc; +package me.lucko.luckperms.common.commands.impl.misc; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SingleCommand; +import me.lucko.luckperms.common.commands.abstraction.SingleCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/misc/SearchCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/SearchCommand.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/misc/SearchCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/SearchCommand.java index 6fe7c30e..0f1c4e05 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/misc/SearchCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/SearchCommand.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.misc; +package me.lucko.luckperms.common.commands.impl.misc; import me.lucko.luckperms.api.HeldPermission; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SingleCommand; +import me.lucko.luckperms.common.commands.abstraction.SingleCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.Util; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/misc/SyncCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/SyncCommand.java similarity index 94% rename from common/src/main/java/me/lucko/luckperms/common/commands/misc/SyncCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/SyncCommand.java index 50984e9f..80ac9fbd 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/misc/SyncCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/SyncCommand.java @@ -20,10 +20,10 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.misc; +package me.lucko.luckperms.common.commands.impl.misc; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SingleCommand; +import me.lucko.luckperms.common.commands.abstraction.SingleCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/misc/TreeCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/TreeCommand.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/misc/TreeCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/TreeCommand.java index 5ed97128..51933e2b 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/misc/TreeCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/TreeCommand.java @@ -20,14 +20,14 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.misc; +package me.lucko.luckperms.common.commands.impl.misc; import me.lucko.luckperms.api.caching.PermissionData; import me.lucko.luckperms.common.caching.UserCache; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SingleCommand; +import me.lucko.luckperms.common.commands.abstraction.SingleCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.Util; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/misc/VerboseCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/VerboseCommand.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/misc/VerboseCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/VerboseCommand.java index 57a0fcf9..fa52721f 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/misc/VerboseCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/misc/VerboseCommand.java @@ -20,11 +20,11 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.misc; +package me.lucko.luckperms.common.commands.impl.misc; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SingleCommand; +import me.lucko.luckperms.common.commands.abstraction.SingleCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/CreateTrack.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/CreateTrack.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/track/CreateTrack.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/track/CreateTrack.java index 48c1d45e..dd4fac37 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/CreateTrack.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/CreateTrack.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.track; +package me.lucko.luckperms.common.commands.impl.track; import me.lucko.luckperms.api.event.cause.CreationCause; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SingleCommand; +import me.lucko.luckperms.common.commands.abstraction.SingleCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/DeleteTrack.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/DeleteTrack.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/track/DeleteTrack.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/track/DeleteTrack.java index b87cff7f..bc389db4 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/DeleteTrack.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/DeleteTrack.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.track; +package me.lucko.luckperms.common.commands.impl.track; import me.lucko.luckperms.api.event.cause.DeletionCause; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SingleCommand; +import me.lucko.luckperms.common.commands.abstraction.SingleCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/ListTracks.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/ListTracks.java similarity index 94% rename from common/src/main/java/me/lucko/luckperms/common/commands/track/ListTracks.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/track/ListTracks.java index 40619f01..3562628a 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/ListTracks.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/ListTracks.java @@ -20,10 +20,10 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.track; +package me.lucko.luckperms.common.commands.impl.track; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SingleCommand; +import me.lucko.luckperms.common.commands.abstraction.SingleCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackAppend.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackAppend.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/track/TrackAppend.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackAppend.java index 693dd0a8..f17f89a9 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackAppend.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackAppend.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.track; +package me.lucko.luckperms.common.commands.impl.track; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackClear.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackClear.java similarity index 94% rename from common/src/main/java/me/lucko/luckperms/common/commands/track/TrackClear.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackClear.java index b02229a8..613eec93 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackClear.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackClear.java @@ -20,11 +20,11 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.track; +package me.lucko.luckperms.common.commands.impl.track; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackClone.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackClone.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/track/TrackClone.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackClone.java index fd04bd23..83321afd 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackClone.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackClone.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.track; +package me.lucko.luckperms.common.commands.impl.track; import me.lucko.luckperms.api.event.cause.CreationCause; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackInfo.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackInfo.java similarity index 94% rename from common/src/main/java/me/lucko/luckperms/common/commands/track/TrackInfo.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackInfo.java index 1a4a6c01..a0d0c5a0 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackInfo.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackInfo.java @@ -20,11 +20,11 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.track; +package me.lucko.luckperms.common.commands.impl.track; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackInsert.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackInsert.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/track/TrackInsert.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackInsert.java index 41bd182c..e69a4240 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackInsert.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackInsert.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.track; +package me.lucko.luckperms.common.commands.impl.track; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackMainCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackMainCommand.java similarity index 93% rename from common/src/main/java/me/lucko/luckperms/common/commands/track/TrackMainCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackMainCommand.java index 443654e2..5e298d5b 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackMainCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackMainCommand.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.track; +package me.lucko.luckperms.common.commands.impl.track; import com.google.common.collect.ImmutableList; -import me.lucko.luckperms.common.commands.Command; -import me.lucko.luckperms.common.commands.MainCommand; +import me.lucko.luckperms.common.commands.abstraction.Command; +import me.lucko.luckperms.common.commands.abstraction.MainCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.core.model.Track; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackRemove.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackRemove.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/track/TrackRemove.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackRemove.java index 9af0e148..e0637696 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackRemove.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackRemove.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.track; +package me.lucko.luckperms.common.commands.impl.track; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackRename.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackRename.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/track/TrackRename.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackRename.java index ff3a990d..1357a9b2 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackRename.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/track/TrackRename.java @@ -20,14 +20,14 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.track; +package me.lucko.luckperms.common.commands.impl.track; import me.lucko.luckperms.api.event.cause.CreationCause; import me.lucko.luckperms.api.event.cause.DeletionCause; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserBulkChange.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserBulkChange.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/user/UserBulkChange.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserBulkChange.java index 799b9329..f0e9251c 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserBulkChange.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserBulkChange.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.user; +package me.lucko.luckperms.common.commands.impl.user; import me.lucko.luckperms.api.Node; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserClear.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserClear.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/user/UserClear.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserClear.java index b2897841..b15ab001 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserClear.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserClear.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.user; +package me.lucko.luckperms.common.commands.impl.user; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserDemote.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserDemote.java similarity index 98% rename from common/src/main/java/me/lucko/luckperms/common/commands/user/UserDemote.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserDemote.java index 3e5a1c85..cd0a11d9 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserDemote.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserDemote.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.user; +package me.lucko.luckperms.common.commands.impl.user; import com.google.common.base.Objects; @@ -28,7 +28,7 @@ import me.lucko.luckperms.api.Node; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserGetUUID.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserGetUUID.java similarity index 94% rename from common/src/main/java/me/lucko/luckperms/common/commands/user/UserGetUUID.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserGetUUID.java index 11f769a7..24b1dbce 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserGetUUID.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserGetUUID.java @@ -20,11 +20,11 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.user; +package me.lucko.luckperms.common.commands.impl.user; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserInfo.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserInfo.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/user/UserInfo.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserInfo.java index 867f018a..bfa9d3be 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserInfo.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserInfo.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.user; +package me.lucko.luckperms.common.commands.impl.user; import me.lucko.luckperms.api.Contexts; import me.lucko.luckperms.api.Node; @@ -28,7 +28,7 @@ import me.lucko.luckperms.api.caching.MetaData; import me.lucko.luckperms.api.caching.UserData; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserMainCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserMainCommand.java similarity index 88% rename from common/src/main/java/me/lucko/luckperms/common/commands/user/UserMainCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserMainCommand.java index 8465e145..efd6901a 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserMainCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserMainCommand.java @@ -20,16 +20,16 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.user; +package me.lucko.luckperms.common.commands.impl.user; import com.google.common.collect.ImmutableList; -import me.lucko.luckperms.common.commands.Command; -import me.lucko.luckperms.common.commands.MainCommand; -import me.lucko.luckperms.common.commands.generic.meta.CommandMeta; -import me.lucko.luckperms.common.commands.generic.other.HolderShowTracks; -import me.lucko.luckperms.common.commands.generic.parent.CommandParent; -import me.lucko.luckperms.common.commands.generic.permission.CommandPermission; +import me.lucko.luckperms.common.commands.abstraction.Command; +import me.lucko.luckperms.common.commands.abstraction.MainCommand; +import me.lucko.luckperms.common.commands.impl.generic.meta.CommandMeta; +import me.lucko.luckperms.common.commands.impl.generic.other.HolderShowTracks; +import me.lucko.luckperms.common.commands.impl.generic.parent.CommandParent; +import me.lucko.luckperms.common.commands.impl.generic.permission.CommandPermission; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserPromote.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserPromote.java similarity index 98% rename from common/src/main/java/me/lucko/luckperms/common/commands/user/UserPromote.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserPromote.java index a4f35931..9845067c 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserPromote.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserPromote.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.user; +package me.lucko.luckperms.common.commands.impl.user; import com.google.common.base.Objects; @@ -28,7 +28,7 @@ import me.lucko.luckperms.api.Node; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserSwitchPrimaryGroup.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserSwitchPrimaryGroup.java similarity index 96% rename from common/src/main/java/me/lucko/luckperms/common/commands/user/UserSwitchPrimaryGroup.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserSwitchPrimaryGroup.java index 4b9a2aa5..04dcb6ed 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserSwitchPrimaryGroup.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/user/UserSwitchPrimaryGroup.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.user; +package me.lucko.luckperms.common.commands.impl.user; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/usersbulkedit/BulkEditGroup.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/usersbulkedit/BulkEditGroup.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/usersbulkedit/BulkEditGroup.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/usersbulkedit/BulkEditGroup.java index 293c1e4f..22b40fe2 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/usersbulkedit/BulkEditGroup.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/usersbulkedit/BulkEditGroup.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.usersbulkedit; +package me.lucko.luckperms.common.commands.impl.usersbulkedit; import me.lucko.luckperms.api.Node; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/usersbulkedit/BulkEditPermission.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/usersbulkedit/BulkEditPermission.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/commands/usersbulkedit/BulkEditPermission.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/usersbulkedit/BulkEditPermission.java index 298ac857..e77b09b7 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/usersbulkedit/BulkEditPermission.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/usersbulkedit/BulkEditPermission.java @@ -20,13 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.usersbulkedit; +package me.lucko.luckperms.common.commands.impl.usersbulkedit; import me.lucko.luckperms.api.Node; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/usersbulkedit/UsersBulkEditMainCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/impl/usersbulkedit/UsersBulkEditMainCommand.java similarity index 92% rename from common/src/main/java/me/lucko/luckperms/common/commands/usersbulkedit/UsersBulkEditMainCommand.java rename to common/src/main/java/me/lucko/luckperms/common/commands/impl/usersbulkedit/UsersBulkEditMainCommand.java index e3bf9739..3497b566 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/usersbulkedit/UsersBulkEditMainCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/impl/usersbulkedit/UsersBulkEditMainCommand.java @@ -20,12 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.commands.usersbulkedit; +package me.lucko.luckperms.common.commands.impl.usersbulkedit; import com.google.common.collect.ImmutableList; -import me.lucko.luckperms.common.commands.Command; -import me.lucko.luckperms.common.commands.MainCommand; +import me.lucko.luckperms.common.commands.abstraction.Command; +import me.lucko.luckperms.common.commands.abstraction.MainCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.plugin.LuckPermsPlugin; import me.lucko.luckperms.common.storage.Storage; @@ -62,7 +62,7 @@ public class UsersBulkEditMainCommand extends MainCommand { @Override public List tabComplete(LuckPermsPlugin plugin, Sender sender, List args) { - final List> subs = getSubCommands().stream() + final List> subs = getChildren().get().stream() .filter(s -> s.isAuthorized(sender)) .collect(Collectors.toList()); diff --git a/common/src/main/java/me/lucko/luckperms/common/plugin/LuckPermsPlugin.java b/common/src/main/java/me/lucko/luckperms/common/plugin/LuckPermsPlugin.java index 0066a018..b90d6f70 100644 --- a/common/src/main/java/me/lucko/luckperms/common/plugin/LuckPermsPlugin.java +++ b/common/src/main/java/me/lucko/luckperms/common/plugin/LuckPermsPlugin.java @@ -28,8 +28,8 @@ import me.lucko.luckperms.api.PlatformType; import me.lucko.luckperms.common.api.ApiProvider; import me.lucko.luckperms.common.caching.handlers.CachedStateManager; import me.lucko.luckperms.common.calculators.CalculatorFactory; -import me.lucko.luckperms.common.commands.BaseCommand; import me.lucko.luckperms.common.commands.CommandManager; +import me.lucko.luckperms.common.commands.abstraction.Command; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.config.LuckPermsConfiguration; @@ -341,7 +341,7 @@ public interface LuckPermsPlugin { */ Set getPreProcessContexts(boolean op); - default List getExtraCommands() { + default List getExtraCommands() { return Collections.emptyList(); } diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/LPSpongePlugin.java b/sponge/src/main/java/me/lucko/luckperms/sponge/LPSpongePlugin.java index 9a9e39ef..29a10a85 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/LPSpongePlugin.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/LPSpongePlugin.java @@ -33,7 +33,7 @@ import me.lucko.luckperms.common.api.ApiHandler; import me.lucko.luckperms.common.api.ApiProvider; import me.lucko.luckperms.common.caching.handlers.CachedStateManager; import me.lucko.luckperms.common.calculators.CalculatorFactory; -import me.lucko.luckperms.common.commands.BaseCommand; +import me.lucko.luckperms.common.commands.abstraction.Command; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.config.ConfigKeys; import me.lucko.luckperms.common.config.LuckPermsConfiguration; @@ -456,7 +456,7 @@ public class LPSpongePlugin implements LuckPermsPlugin { } @Override - public List getExtraCommands() { + public List getExtraCommands() { return Collections.singletonList(new SpongeMainCommand(this)); } diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/OptionClear.java b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/OptionClear.java index 21f376db..f0618ec5 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/OptionClear.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/OptionClear.java @@ -26,7 +26,7 @@ import me.lucko.luckperms.api.context.ContextSet; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.Util; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/OptionInfo.java b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/OptionInfo.java index 79a6b004..837e0584 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/OptionInfo.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/OptionInfo.java @@ -27,7 +27,7 @@ import me.lucko.luckperms.api.context.ImmutableContextSet; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.Util; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/OptionSet.java b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/OptionSet.java index ba047f67..3622d698 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/OptionSet.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/OptionSet.java @@ -26,7 +26,7 @@ import me.lucko.luckperms.api.context.ContextSet; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.Util; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/OptionUnset.java b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/OptionUnset.java index adef7c7a..f496aa14 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/OptionUnset.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/OptionUnset.java @@ -26,7 +26,7 @@ import me.lucko.luckperms.api.context.ContextSet; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.Util; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/ParentAdd.java b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/ParentAdd.java index d6681df6..9e563dd5 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/ParentAdd.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/ParentAdd.java @@ -26,7 +26,7 @@ import me.lucko.luckperms.api.context.ContextSet; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.Util; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/ParentClear.java b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/ParentClear.java index 2bf8117b..ca3799e0 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/ParentClear.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/ParentClear.java @@ -26,7 +26,7 @@ import me.lucko.luckperms.api.context.ContextSet; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.Util; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/ParentInfo.java b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/ParentInfo.java index 6c228737..1019398c 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/ParentInfo.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/ParentInfo.java @@ -27,7 +27,7 @@ import me.lucko.luckperms.api.context.ImmutableContextSet; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.Util; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/ParentRemove.java b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/ParentRemove.java index 05e24992..7cef13f1 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/ParentRemove.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/ParentRemove.java @@ -26,7 +26,7 @@ import me.lucko.luckperms.api.context.ContextSet; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.Util; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/PermissionClear.java b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/PermissionClear.java index 8f7b5c78..a262d674 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/PermissionClear.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/PermissionClear.java @@ -26,7 +26,7 @@ import me.lucko.luckperms.api.context.ContextSet; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.Util; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/PermissionInfo.java b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/PermissionInfo.java index 0616f5d7..ec21d1b4 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/PermissionInfo.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/PermissionInfo.java @@ -27,7 +27,7 @@ import me.lucko.luckperms.api.context.ImmutableContextSet; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.Util; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/PermissionSet.java b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/PermissionSet.java index 54ea5b0d..b2863fc8 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/PermissionSet.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/PermissionSet.java @@ -27,7 +27,7 @@ import me.lucko.luckperms.api.context.ContextSet; import me.lucko.luckperms.common.commands.Arg; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.Util; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/SpongeMainCommand.java b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/SpongeMainCommand.java index fb7577fa..3ee96a23 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/commands/SpongeMainCommand.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/commands/SpongeMainCommand.java @@ -26,11 +26,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import me.lucko.luckperms.common.commands.Arg; -import me.lucko.luckperms.common.commands.BaseCommand; -import me.lucko.luckperms.common.commands.Command; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandManager; import me.lucko.luckperms.common.commands.CommandResult; +import me.lucko.luckperms.common.commands.abstraction.Command; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; @@ -50,7 +49,7 @@ import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; -public class SpongeMainCommand extends BaseCommand { +public class SpongeMainCommand extends Command { private final LPSpongePlugin plugin; private final Map>> subCommands = ImmutableMap.>>builder() diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationPermissionManager.java b/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationPermissionManager.java index 287461c3..d366c977 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationPermissionManager.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationPermissionManager.java @@ -25,8 +25,8 @@ package me.lucko.luckperms.sponge.migration; import me.lucko.luckperms.api.event.cause.CreationCause; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; -import me.lucko.luckperms.common.commands.migration.MigrationUtils; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; +import me.lucko.luckperms.common.commands.impl.migration.MigrationUtils; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Permission; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationPermissionsEx.java b/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationPermissionsEx.java index 9db6f6fe..1088cbb9 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationPermissionsEx.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationPermissionsEx.java @@ -25,8 +25,8 @@ package me.lucko.luckperms.sponge.migration; import me.lucko.luckperms.api.event.cause.CreationCause; import me.lucko.luckperms.common.commands.CommandException; import me.lucko.luckperms.common.commands.CommandResult; -import me.lucko.luckperms.common.commands.SubCommand; -import me.lucko.luckperms.common.commands.migration.MigrationUtils; +import me.lucko.luckperms.common.commands.abstraction.SubCommand; +import me.lucko.luckperms.common.commands.impl.migration.MigrationUtils; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Permission; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/migration/SpongeMigrationUtils.java b/sponge/src/main/java/me/lucko/luckperms/sponge/migration/SpongeMigrationUtils.java index 8db4d359..e2a3342c 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/migration/SpongeMigrationUtils.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/migration/SpongeMigrationUtils.java @@ -25,7 +25,7 @@ package me.lucko.luckperms.sponge.migration; import lombok.experimental.UtilityClass; import me.lucko.luckperms.api.context.ContextSet; -import me.lucko.luckperms.common.commands.migration.MigrationUtils; +import me.lucko.luckperms.common.commands.impl.migration.MigrationUtils; import me.lucko.luckperms.common.core.NodeBuilder; import me.lucko.luckperms.common.core.NodeFactory; import me.lucko.luckperms.common.core.model.Group;