aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorkashike <[email protected]>2016-02-15 07:11:57 -0800
committerkashike <[email protected]>2016-02-15 07:13:16 -0800
commitedc2cd686e0bfebe722452cf9f90eaf9fcf3230b (patch)
tree88dba320f5d037770f02240b2ad57827549bf308
parent7022e9325ff2be949fdf171754ec0fa6a051e0ea (diff)
downloadPaper-edc2cd686e0bfebe722452cf9f90eaf9fcf3230b.tar.gz
Paper-edc2cd686e0bfebe722452cf9f90eaf9fcf3230b.zip
Expose server CommandMap
-rw-r--r--Spigot-API-Patches/0018-Expose-server-CommandMap.patch67
-rw-r--r--Spigot-Server-Patches/0090-Expose-server-CommandMap.patch21
2 files changed, 88 insertions, 0 deletions
diff --git a/Spigot-API-Patches/0018-Expose-server-CommandMap.patch b/Spigot-API-Patches/0018-Expose-server-CommandMap.patch
new file mode 100644
index 0000000000..36de441a16
--- /dev/null
+++ b/Spigot-API-Patches/0018-Expose-server-CommandMap.patch
@@ -0,0 +1,67 @@
+From 184494ffcdbd826e48aa98fd8945b44723793af8 Mon Sep 17 00:00:00 2001
+From: kashike <[email protected]>
+Date: Mon, 15 Feb 2016 07:11:17 -0800
+Subject: [PATCH] Expose server CommandMap
+
+
+diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
+index a4396e8..f0e1b99 100644
+--- a/src/main/java/org/bukkit/Bukkit.java
++++ b/src/main/java/org/bukkit/Bukkit.java
+@@ -14,6 +14,7 @@ import java.util.logging.Logger;
+
+ import org.bukkit.Warning.WarningState;
+ import org.bukkit.command.CommandException;
++import org.bukkit.command.CommandMap;
+ import org.bukkit.command.CommandSender;
+ import org.bukkit.command.ConsoleCommandSender;
+ import org.bukkit.command.PluginCommand;
+@@ -1130,6 +1131,17 @@ public final class Bukkit {
+ return server.getUnsafe();
+ }
+
++ // Paper start
++ /**
++ * Gets the active {@link CommandMap}.
++ *
++ * @return the active command map
++ */
++ public static CommandMap getCommandMap() {
++ return server.getCommandMap();
++ }
++ // Paper end
++
+ public static Server.Spigot spigot()
+ {
+ return server.spigot();
+diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
+index ae75bd4..316336d 100644
+--- a/src/main/java/org/bukkit/Server.java
++++ b/src/main/java/org/bukkit/Server.java
+@@ -14,6 +14,7 @@ import java.util.logging.Logger;
+
+ import org.bukkit.Warning.WarningState;
+ import org.bukkit.command.CommandException;
++import org.bukkit.command.CommandMap;
+ import org.bukkit.command.CommandSender;
+ import org.bukkit.command.ConsoleCommandSender;
+ import org.bukkit.command.PluginCommand;
+@@ -924,6 +925,15 @@ public interface Server extends PluginMessageRecipient {
+ @Deprecated
+ UnsafeValues getUnsafe();
+
++ // Paper start
++ /**
++ * Gets the active {@link CommandMap}.
++ *
++ * @return the active command map
++ */
++ CommandMap getCommandMap();
++ // Paper end
++
+ public class Spigot
+ {
+ @Deprecated
+--
+2.7.0.rc0.20.g4b9ab0e
+
diff --git a/Spigot-Server-Patches/0090-Expose-server-CommandMap.patch b/Spigot-Server-Patches/0090-Expose-server-CommandMap.patch
new file mode 100644
index 0000000000..efac49231f
--- /dev/null
+++ b/Spigot-Server-Patches/0090-Expose-server-CommandMap.patch
@@ -0,0 +1,21 @@
+From db26b15a3200ab4d0306f0879bb88887938493df Mon Sep 17 00:00:00 2001
+From: kashike <[email protected]>
+Date: Mon, 15 Feb 2016 07:11:28 -0800
+Subject: [PATCH] Expose server CommandMap
+
+
+diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+index 642880e..7b8fdc3 100644
+--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+@@ -1558,6 +1558,7 @@ public final class CraftServer implements Server {
+ return helpMap;
+ }
+
++ @Override // Paper - add override
+ public SimpleCommandMap getCommandMap() {
+ return commandMap;
+ }
+--
+2.7.0.rc0.20.g4b9ab0e
+