forked from PaperMC/Paper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0014-Expose-server-CommandMap.patch
50 lines (46 loc) · 1.58 KB
/
0014-Expose-server-CommandMap.patch
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 <[email protected]>
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 15543603c168623572b1a26e41eb20058770784d..b46222ed2822fea563585462e43ee73ba2bb9b37 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1575,6 +1575,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 3af00d77f9015f2eccab3047676b70c1af68daa7..d3c498ad0e7681422ef2117be41c6603ebce0e0a 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1186,6 +1186,15 @@ public interface Server extends PluginMessageRecipient {
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.
*