aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0018-Expose-server-CommandMap.patch
blob: 9f4a755b1bb35446b257b7e2f565c18ba42c394a (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 bbee4e40917cca4e692c3d60c1c513b4c847160f..259c15ada05115b9fc86f1de06649d5cec2ef137 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1912,6 +1912,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 835041d2ab6545e52d963d96d558f9a7e52d279a..66211ef974b9e091983bfda108f6e420c01a9d78 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1471,6 +1471,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.
      *