aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0019-Expose-server-CommandMap.patch
blob: 55786e0ffbd42579bbf7d14bc7ff85eb6e7332f8 (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 9b28dcade753bf3d2117d3d2638b529db0e533d4..fe074fe9553f61bdd72b64830532a78415348781 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -2334,6 +2334,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 6e3f48f39bd32537f747dbe5b323f882d1b48b16..9545da2adacaf0bd719c2baef929588cd1042d25 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1814,6 +1814,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.
      *