File tree Expand file tree Collapse file tree
src/main/java/me/general_breddok/blockdisplaycreator Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -124,11 +124,11 @@ public void onLoad() {
124124
125125 this .versionManager = new VersionManager (this .getServer ());
126126
127- if (!this .versionManager .isVersion1_19_4 ()) {
127+ if (this .versionManager .isVersion1_19_4 () || this .versionManager .isVersionLater1_21_8 ()) {
128+ ChatUtil .log ("&6[BlockDisplayCreator] &eCommandAPI is not supported on Minecraft 1.19.4 and 1.21.8+, using legacy commands." );
129+ } else {
128130 this .capi = true ;
129131 CommandAPI .onLoad (new CommandAPISpigotConfig (this ).setNamespace ("bdc" ));
130- } else {
131- ChatUtil .log ("&6[BlockDisplayCreator] &eCommandAPI is not supported on Minecraft 1.19.4 and below, using legacy commands." );
132132 }
133133
134134 this .dependentPluginsManager .loadPacketEvents ();
Original file line number Diff line number Diff line change @@ -63,6 +63,16 @@ private String extractVersion(String bukkitVersion) {
6363 return bukkitVersion .split ("-" )[0 ];
6464 }
6565
66+
67+ /**
68+ * Checks if the server is running a version later than 1.21.8.
69+ *
70+ * @return {@code true} if the current version is 1.21.9 or later
71+ */
72+ public boolean isVersionLater1_21_8 () {
73+ return this .currentVersion .isAtLeast (MinecraftVersion .V1_21_9 );
74+ }
75+
6676 /**
6777 * Checks if the server is running a version earlier than 1.20.5.
6878 *
You can’t perform that action at this time.
0 commit comments