Skip to content

Commit b2f2c77

Browse files
committed
Update CloudBukkitCapabilities checks
fixes #132
1 parent 2030ed9 commit b2f2c77

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

cloud-bukkit/src/main/java/org/incendo/cloud/bukkit/CloudBukkitCapabilities.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,15 @@ public enum CloudBukkitCapabilities implements CloudCapability {
4040
* even if a capability for Brigadier command registration is not present (as long as this capability is present).
4141
*/
4242
BRIGADIER(CraftBukkitReflection.classExists("com.mojang.brigadier.tree.CommandNode")
43-
&& CraftBukkitReflection.findOBCClass("command.BukkitCommandWrapper") != null),
43+
&& (CraftBukkitReflection.findOBCClass("command.BukkitCommandWrapper") != null
44+
|| CraftBukkitReflection.classExists("io.papermc.paper.command.brigadier.CommandSourceStack"))),
4445

4546
/**
4647
* Whether support for native Brigadier command registration is available
4748
* through the Paper API ({@code PaperCommandManager#registerBrigadier} from {@code cloud-paper}).
4849
*/
49-
NATIVE_BRIGADIER(CraftBukkitReflection.classExists(
50-
"com.destroystokyo.paper.event.brigadier.CommandRegisteredEvent")),
50+
NATIVE_BRIGADIER(CraftBukkitReflection.classExists("com.destroystokyo.paper.event.brigadier.CommandRegisteredEvent")
51+
|| CraftBukkitReflection.classExists("io.papermc.paper.command.brigadier.CommandSourceStack")),
5152

5253
/**
5354
* Whether support for Brigadier command registration is available through Commodore

0 commit comments

Comments
 (0)