From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: kashike 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 357536ffc82e2adb220a3069fa2e76fa28f215e4..0a3ae145c5406999eecbf0983cff8790ce42388e 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -1796,6 +1796,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 f3102fdbb4caab2d58a8f5e305ac80fa36d10d8d..53455bbe675bdfd424d8cebeb057c1d8defd0dd5 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -1382,6 +1382,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. *