diff --git a/dependency-reduced-pom.xml b/dependency-reduced-pom.xml
new file mode 100644
index 0000000..d5c355b
--- /dev/null
+++ b/dependency-reduced-pom.xml
@@ -0,0 +1,84 @@
+
+
+ 4.0.0
+ nl.iobyte
+ themeparkconnector
+ 3.0.1
+
+
+
+ maven-shade-plugin
+ 3.2.0
+
+
+ package
+
+ shade
+
+
+
+
+
+
+
+
+ vault-repo
+ http://nexus.hc.to/content/repositories/pub_releases
+
+
+ codemc-repo
+ https://repo.codemc.org/repository/maven-public/
+
+
+
+
+ org.spigotmc
+ spigot-api
+ 1.12.2-R0.1-SNAPSHOT
+ provided
+
+
+ commons-lang
+ commons-lang
+
+
+ json-simple
+ com.googlecode.json-simple
+
+
+ guava
+ com.google.guava
+
+
+ gson
+ com.google.code.gson
+
+
+ snakeyaml
+ org.yaml
+
+
+ bungeecord-chat
+ net.md-5
+
+
+
+
+ nl.iobyte
+ themepark
+ 3.0.2
+ provided
+
+
+ net.milkbowl.vault
+ VaultAPI
+ 1.7
+ provided
+
+
+
+ 11
+ 11
+ UTF-8
+
+
diff --git a/pom.xml b/pom.xml
index 41fa513..21a7d71 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
nl.iobyte
themeparkconnector
- 3.0.0
+ 3.0.1
@@ -41,7 +41,7 @@
nl.iobyte
themepark
- 3.0.0
+ 3.0.2
provided
diff --git a/src/main/java/nl/iobyte/themeparkconnector/commands/ThemeParkConnectorCommand.java b/src/main/java/nl/iobyte/themeparkconnector/commands/ThemeParkConnectorCommand.java
index 6c826fb..4f1bfc8 100644
--- a/src/main/java/nl/iobyte/themeparkconnector/commands/ThemeParkConnectorCommand.java
+++ b/src/main/java/nl/iobyte/themeparkconnector/commands/ThemeParkConnectorCommand.java
@@ -1,10 +1,14 @@
package nl.iobyte.themeparkconnector.commands;
import nl.iobyte.commandapi.CommandFactory;
+import nl.iobyte.commandapi.interfaces.ICommandExecutor;
import nl.iobyte.commandapi.middlewares.PermissionMiddleware;
+import nl.iobyte.themepark.commands.executors.ConsoleExecutor;
+import nl.iobyte.themepark.commands.executors.PlayerExecutor;
import nl.iobyte.themeparkconnector.ThemeParkConnector;
import nl.iobyte.themeparkconnector.commands.subcommands.*;
import nl.iobyte.themeparkconnector.commands.subcommands.operator.OperatorCommands;
+import org.bukkit.entity.Player;
public class ThemeParkConnectorCommand {
@@ -26,7 +30,14 @@ public class ThemeParkConnectorCommand {
factory.addMiddleware(new PermissionMiddleware());
//Register command
- factory.registerCommand(ThemeParkConnector.getInstance());
+ ThemeParkConnector.getInstance().getCommand(factory.getName()).setExecutor((sender, command, s, args) -> {
+ ICommandExecutor executor = new ConsoleExecutor(sender);
+ if(sender instanceof Player)
+ executor = new PlayerExecutor((Player) sender);
+
+ factory.onCommand(executor, args);
+ return true;
+ });
}
}
diff --git a/src/main/java/nl/iobyte/themeparkconnector/commands/arguments/OperatorArgument.java b/src/main/java/nl/iobyte/themeparkconnector/commands/arguments/OperatorArgument.java
index 226d6f6..10a8662 100644
--- a/src/main/java/nl/iobyte/themeparkconnector/commands/arguments/OperatorArgument.java
+++ b/src/main/java/nl/iobyte/themeparkconnector/commands/arguments/OperatorArgument.java
@@ -7,7 +7,7 @@ import nl.iobyte.themeparkconnector.api.operator.objects.AttractionOperator;
import nl.iobyte.themeparkconnector.api.operator.objects.panel.OperatorItem;
import nl.iobyte.themeparkconnector.api.operator.objects.panel.OperatorItemState;
import org.bukkit.ChatColor;
-import org.bukkit.command.CommandSender;
+import nl.iobyte.commandapi.interfaces.ICommandExecutor;
import java.util.Arrays;
import java.util.List;
@@ -27,12 +27,12 @@ public class OperatorArgument implements ICommandArgument {
/**
* Check if argument is valid OperatorItemState
- * @param sender CommandSender
+ * @param sender ICommandExecutor
* @param args Arguments passed by Command
* @param previousArguments Previous arguments
* @return Boolean
*/
- public ArgumentCheck checkArgument(CommandSender sender, String[] args, List