aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0021-Expose-server-CommandMap.patch
blob: 16ac67db3a3e98ecb7e9e17656f3dfa9cd66ab82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Mon, 29 Feb 2016 19:48:59 -0600
Subject: [PATCH] Expose server CommandMap


diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index e4cdd6a68a52d0415d0281d03f50fe75c9924b7e..2a287fc77ef5cc6404dccdab01740e2b8b11ef43 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -2241,6 +2241,19 @@ public final class Bukkit {
         return server.getUnsafe();
     }
 
+
+    // Paper start
+    /**
+     * Gets the active {@link org.bukkit.command.CommandMap}
+     *
+     * @return the active command map
+     */
+    @NotNull
+    public static org.bukkit.command.CommandMap getCommandMap() {
+        return server.getCommandMap();
+    }
+    // Paper end
+
     @NotNull
     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 17927955c481798b3bc40200168875bd319dd578..e0ca9516051bc566da2783f0574e791166d5922c 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1751,6 +1751,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
     public double[] getTPS();
     // Paper end
 
+    // Paper start
+    /**
+     * Gets the active {@link org.bukkit.command.CommandMap}
+     *
+     * @return the active command map
+     */
+    @NotNull
+    org.bukkit.command.CommandMap getCommandMap();
+
     /**
      * Get the advancement specified by this key.
      *