Paper/patches/api/0018-Expose-server-CommandMap.patch
Nassim Jahnke 1cfd363d32
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
fc460d1b PR-735: Add Villager#zombify
c8c8331e PR-690: Add method to read ItemStack input
62845f2f SPIGOT-6829: Add per-player world border API

CraftBukkit Changes:
a459f4d4 PR-1033: Add Villager#zombify
d65d1430 PR-975: Add method to read ItemStack input
b5559f8c SPIGOT-6990: Fix setRepairCost(0) in Anvil
6c308e1b SPIGOT-6829: Add per-player world border API

Spigot Changes:
42b61526 SPIGOT-7000: Generation and /locate issues when using custom structure seeds
2022-04-16 10:29:50 +02:00

51 lines
1.6 KiB
Diff

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 595d368bc88b6217f1fb2e074de7fd5b07fa96df..4486e8ddcfc3aa1403bbfce28c0356c174709a9b 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -2029,6 +2029,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 5aa2040dc51f65ad57329a5a235a22c50c62f1b2..96d6b49d609142fe93d5d07e65dd126adb5c2bde 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1577,6 +1577,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.
*