Skip to content

Commit

Permalink
[Bukkit] Fix error when a plugin shades adventure library without rel…
Browse files Browse the repository at this point in the history
…ocating it
  • Loading branch information
NEZNAMY committed Dec 3, 2024
1 parent c54a2b7 commit 5d85c46
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import me.neznamy.tab.shared.platform.impl.DummyBossBar;
import me.neznamy.tab.shared.util.PerformanceUtil;
import me.neznamy.tab.shared.util.ReflectionUtils;
import net.kyori.adventure.audience.Audience;
import net.milkbowl.vault.chat.Chat;
import net.milkbowl.vault.permission.Permission;
import org.bstats.bukkit.Metrics;
Expand Down Expand Up @@ -273,7 +274,8 @@ public Scoreboard createScoreboard(@NotNull TabPlayer player) {
@Override
@NotNull
public BossBar createBossBar(@NotNull TabPlayer player) {
if (AdventureBossBar.isAvailable()) return new AdventureBossBar(player);
//noinspection ConstantValue
if (AdventureBossBar.isAvailable() && Audience.class.isAssignableFrom(Player.class)) return new AdventureBossBar(player);

// 1.9+ server, handle using API, potential 1.8 players are handled by ViaVersion
if (BukkitReflection.getMinorVersion() >= 9) return new BukkitBossBar((BukkitTabPlayer) player);
Expand Down

0 comments on commit 5d85c46

Please sign in to comment.