From fb4fb980e07503939238a049bc6cce798dcb5835 Mon Sep 17 00:00:00 2001 From: Kenzie Togami Date: Tue, 30 Apr 2019 15:03:18 -0700 Subject: [PATCH] Condense some command packages --- .../com/sk89q/worldedit/command/ApplyBrushCommands.java | 2 +- .../com/sk89q/worldedit/command/PaintBrushCommands.java | 2 +- .../sk89q/worldedit/command/util/AsyncCommandHelper.java | 2 +- .../worldedit/command/util/MessageFutureCallback.java | 2 +- .../sk89q/worldedit/command/util/PrintCommandHelp.java | 4 ++-- .../extension/platform/PlatformCommandManager.java | 8 ++++---- .../{util => internal}/command/CommandArgParser.java | 2 +- .../command/CommandRegistrationHandler.java | 2 +- .../worldedit/{util => internal}/command/CommandUtil.java | 2 +- .../command/exception}/ExceptionConverter.java | 2 +- .../command/exception}/ExceptionConverterHelper.java | 3 +-- .../command/exception}/ExceptionMatch.java | 2 +- .../{ => exception}/WorldEditExceptionConverter.java | 4 +--- .../util/formatting/component/CommandUsageBox.java | 4 ++-- .../sk89q/worldedit/util/paste/ActorCallbackPaste.java | 2 +- 15 files changed, 20 insertions(+), 23 deletions(-) rename worldedit-core/src/main/java/com/sk89q/worldedit/{util => internal}/command/CommandArgParser.java (98%) rename worldedit-core/src/main/java/com/sk89q/worldedit/{util => internal}/command/CommandRegistrationHandler.java (97%) rename worldedit-core/src/main/java/com/sk89q/worldedit/{util => internal}/command/CommandUtil.java (97%) rename worldedit-core/src/main/java/com/sk89q/worldedit/{util/command/parametric => internal/command/exception}/ExceptionConverter.java (97%) rename worldedit-core/src/main/java/com/sk89q/worldedit/{util/command/parametric => internal/command/exception}/ExceptionConverterHelper.java (97%) rename worldedit-core/src/main/java/com/sk89q/worldedit/{util/command/parametric => internal/command/exception}/ExceptionMatch.java (95%) rename worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/{ => exception}/WorldEditExceptionConverter.java (97%) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ApplyBrushCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ApplyBrushCommands.java index cfab5fbae..f9ceadd3e 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ApplyBrushCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ApplyBrushCommands.java @@ -35,7 +35,7 @@ import com.sk89q.worldedit.function.factory.Apply; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.regions.factory.RegionFactory; import com.sk89q.worldedit.util.TreeGenerator; -import com.sk89q.worldedit.util.command.CommandRegistrationHandler; +import com.sk89q.worldedit.internal.command.CommandRegistrationHandler; import com.sk89q.worldedit.util.formatting.text.TextComponent; import com.sk89q.worldedit.util.formatting.text.TranslatableComponent; import org.enginehub.piston.CommandManager; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/PaintBrushCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/PaintBrushCommands.java index 4f4064827..cc53ec5b8 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/PaintBrushCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/PaintBrushCommands.java @@ -35,7 +35,7 @@ import com.sk89q.worldedit.function.factory.Paint; import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.regions.factory.RegionFactory; import com.sk89q.worldedit.util.TreeGenerator; -import com.sk89q.worldedit.util.command.CommandRegistrationHandler; +import com.sk89q.worldedit.internal.command.CommandRegistrationHandler; import com.sk89q.worldedit.util.formatting.text.TextComponent; import com.sk89q.worldedit.util.formatting.text.TranslatableComponent; import org.enginehub.piston.CommandManager; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/AsyncCommandHelper.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/AsyncCommandHelper.java index 7557b0834..842cd5752 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/AsyncCommandHelper.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/AsyncCommandHelper.java @@ -24,7 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.sk89q.worldedit.extension.platform.Actor; -import com.sk89q.worldedit.util.command.parametric.ExceptionConverter; +import com.sk89q.worldedit.internal.command.exception.ExceptionConverter; import com.sk89q.worldedit.util.task.FutureForwardingTask; import com.sk89q.worldedit.util.task.Supervisor; import com.sk89q.worldedit.world.World; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/MessageFutureCallback.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/MessageFutureCallback.java index 58b25770d..2a330259e 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/MessageFutureCallback.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/MessageFutureCallback.java @@ -23,7 +23,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.util.concurrent.FutureCallback; import com.sk89q.worldedit.extension.platform.Actor; -import com.sk89q.worldedit.util.command.parametric.ExceptionConverter; +import com.sk89q.worldedit.internal.command.exception.ExceptionConverter; import org.enginehub.piston.exception.CommandException; import javax.annotation.Nullable; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/PrintCommandHelp.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/PrintCommandHelp.java index df57539ba..aa911b705 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/PrintCommandHelp.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/util/PrintCommandHelp.java @@ -36,8 +36,8 @@ import java.util.Optional; import java.util.stream.Collectors; import java.util.stream.Stream; -import static com.sk89q.worldedit.util.command.CommandUtil.byCleanName; -import static com.sk89q.worldedit.util.command.CommandUtil.getSubCommands; +import static com.sk89q.worldedit.internal.command.CommandUtil.byCleanName; +import static com.sk89q.worldedit.internal.command.CommandUtil.getSubCommands; import static java.util.stream.Collectors.toList; /** diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java index f1f7380a4..65df87e16 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java @@ -86,12 +86,12 @@ import com.sk89q.worldedit.event.platform.CommandSuggestionEvent; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.internal.annotation.Selection; import com.sk89q.worldedit.internal.command.CommandLoggingHandler; -import com.sk89q.worldedit.internal.command.WorldEditExceptionConverter; +import com.sk89q.worldedit.internal.command.exception.WorldEditExceptionConverter; import com.sk89q.worldedit.regions.Region; import com.sk89q.worldedit.session.request.Request; -import com.sk89q.worldedit.util.command.CommandArgParser; -import com.sk89q.worldedit.util.command.CommandRegistrationHandler; -import com.sk89q.worldedit.util.command.parametric.ExceptionConverter; +import com.sk89q.worldedit.internal.command.CommandArgParser; +import com.sk89q.worldedit.internal.command.CommandRegistrationHandler; +import com.sk89q.worldedit.internal.command.exception.ExceptionConverter; import com.sk89q.worldedit.util.eventbus.Subscribe; import com.sk89q.worldedit.util.formatting.text.TextComponent; import com.sk89q.worldedit.util.formatting.text.TranslatableComponent; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/CommandArgParser.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/CommandArgParser.java similarity index 98% rename from worldedit-core/src/main/java/com/sk89q/worldedit/util/command/CommandArgParser.java rename to worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/CommandArgParser.java index 5c414d08a..e3605b6f8 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/CommandArgParser.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/CommandArgParser.java @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package com.sk89q.worldedit.util.command; +package com.sk89q.worldedit.internal.command; import java.util.stream.Stream; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/CommandRegistrationHandler.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/CommandRegistrationHandler.java similarity index 97% rename from worldedit-core/src/main/java/com/sk89q/worldedit/util/command/CommandRegistrationHandler.java rename to worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/CommandRegistrationHandler.java index 8e243be98..dec0d6e24 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/CommandRegistrationHandler.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/CommandRegistrationHandler.java @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package com.sk89q.worldedit.util.command; +package com.sk89q.worldedit.internal.command; import com.google.common.collect.ImmutableList; import com.sk89q.worldedit.WorldEdit; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/CommandUtil.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/CommandUtil.java similarity index 97% rename from worldedit-core/src/main/java/com/sk89q/worldedit/util/command/CommandUtil.java rename to worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/CommandUtil.java index 3d86fbfb9..861c7926d 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/CommandUtil.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/CommandUtil.java @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package com.sk89q.worldedit.util.command; +package com.sk89q.worldedit.internal.command; import com.sk89q.worldedit.extension.platform.PlatformCommandManager; import org.enginehub.piston.Command; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/parametric/ExceptionConverter.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/exception/ExceptionConverter.java similarity index 97% rename from worldedit-core/src/main/java/com/sk89q/worldedit/util/command/parametric/ExceptionConverter.java rename to worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/exception/ExceptionConverter.java index e943cd6e9..27a494175 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/parametric/ExceptionConverter.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/exception/ExceptionConverter.java @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package com.sk89q.worldedit.util.command.parametric; +package com.sk89q.worldedit.internal.command.exception; import org.enginehub.piston.exception.CommandException; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/parametric/ExceptionConverterHelper.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/exception/ExceptionConverterHelper.java similarity index 97% rename from worldedit-core/src/main/java/com/sk89q/worldedit/util/command/parametric/ExceptionConverterHelper.java rename to worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/exception/ExceptionConverterHelper.java index 039bd4cde..99a9bce68 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/parametric/ExceptionConverterHelper.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/exception/ExceptionConverterHelper.java @@ -17,10 +17,9 @@ * along with this program. If not, see . */ -package com.sk89q.worldedit.util.command.parametric; +package com.sk89q.worldedit.internal.command.exception; import com.google.common.collect.ImmutableList; -import com.sk89q.minecraft.util.commands.WrappedCommandException; import org.enginehub.piston.exception.CommandException; import org.enginehub.piston.exception.CommandExecutionException; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/parametric/ExceptionMatch.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/exception/ExceptionMatch.java similarity index 95% rename from worldedit-core/src/main/java/com/sk89q/worldedit/util/command/parametric/ExceptionMatch.java rename to worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/exception/ExceptionMatch.java index 619bc9d46..99acf81fa 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/command/parametric/ExceptionMatch.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/exception/ExceptionMatch.java @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package com.sk89q.worldedit.util.command.parametric; +package com.sk89q.worldedit.internal.command.exception; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/WorldEditExceptionConverter.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/exception/WorldEditExceptionConverter.java similarity index 97% rename from worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/WorldEditExceptionConverter.java rename to worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/exception/WorldEditExceptionConverter.java index 3dfafe349..a0100fc4c 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/WorldEditExceptionConverter.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/command/exception/WorldEditExceptionConverter.java @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package com.sk89q.worldedit.internal.command; +package com.sk89q.worldedit.internal.command.exception; import com.google.common.collect.ImmutableList; import com.sk89q.worldedit.DisallowedItemException; @@ -35,8 +35,6 @@ import com.sk89q.worldedit.command.InsufficientArgumentsException; import com.sk89q.worldedit.command.tool.InvalidToolBindException; import com.sk89q.worldedit.internal.expression.ExpressionException; import com.sk89q.worldedit.regions.RegionOperationException; -import com.sk89q.worldedit.util.command.parametric.ExceptionConverterHelper; -import com.sk89q.worldedit.util.command.parametric.ExceptionMatch; import com.sk89q.worldedit.util.formatting.text.TextComponent; import com.sk89q.worldedit.util.io.file.FileSelectionAbortedException; import com.sk89q.worldedit.util.io.file.FilenameResolutionException; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/formatting/component/CommandUsageBox.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/formatting/component/CommandUsageBox.java index d2a97fcf2..46347d107 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/formatting/component/CommandUsageBox.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/formatting/component/CommandUsageBox.java @@ -30,8 +30,8 @@ import java.util.Map; import java.util.stream.Collectors; import static com.google.common.base.Preconditions.checkNotNull; -import static com.sk89q.worldedit.util.command.CommandUtil.byCleanName; -import static com.sk89q.worldedit.util.command.CommandUtil.getSubCommands; +import static com.sk89q.worldedit.internal.command.CommandUtil.byCleanName; +import static com.sk89q.worldedit.internal.command.CommandUtil.getSubCommands; /** * A box to describe usage of a command. diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/paste/ActorCallbackPaste.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/paste/ActorCallbackPaste.java index 4c86e6866..0509275f6 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/paste/ActorCallbackPaste.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/paste/ActorCallbackPaste.java @@ -24,7 +24,7 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.sk89q.worldedit.command.util.AsyncCommandHelper; import com.sk89q.worldedit.extension.platform.Actor; -import com.sk89q.worldedit.util.command.parametric.ExceptionConverter; +import com.sk89q.worldedit.internal.command.exception.ExceptionConverter; import com.sk89q.worldedit.util.task.Supervisor; import org.slf4j.Logger; import org.slf4j.LoggerFactory;