Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
51 Zeilen
1.6 KiB
Diff
51 Zeilen
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 1b00047db23e6d002cd7055250a8d909d4e84667..574ecfe2e4f576f80b519f04e740fa00530a7cfa 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -1846,6 +1846,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 8902267811bb2eba0b5f3bfe53d1b6efd4549333..759237106df6cc2798330be22f7bdb8d18e8f427 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -1417,6 +1417,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.
|
|
*
|