Skip to content

Commit 186b270

Browse files
committed
Fixed crash if PlaceholderAPI not present
1 parent c428cc7 commit 186b270

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/me/itsnathang/bossbarmessage/util/BossBarHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ public static void sendGlobal(BarColor color, BarStyle style, int time, String m
3939
BossBar bar = Bukkit.createBossBar(message, color, style);
4040

4141
Bukkit.getOnlinePlayers().forEach((player) -> {
42-
bar.setTitle(PlaceholderAPI.setPlaceholders(player, message));
42+
if (placeholder_api)
43+
bar.setTitle(PlaceholderAPI.setPlaceholders(player, message));
4344

4445
bar.addPlayer(player);
4546
});

0 commit comments

Comments
 (0)