Skip to content

Commit

Permalink
2.0.0-beta6
Browse files Browse the repository at this point in the history
  • Loading branch information
mdaffa48 committed Sep 21, 2024
1 parent 80be98c commit 4d07fa6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.muhammaddaffa</groupId>
<artifactId>MDLib</artifactId>
<name>MDLib</name>
<version>2.0.0-beta4</version>
<version>2.0.0-beta6</version>
<description>A library for plugin that was created for helping spigot plugin development</description>
<url>https://muhammaddaffa.com</url>
<build>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.muhammaddaffa</groupId>
<artifactId>MDLib</artifactId>
<version>2.0.0-beta5</version>
<version>2.0.0-beta6</version>

<name>MDLib</name>

Expand Down
11 changes: 10 additions & 1 deletion src/main/java/com/muhammaddaffa/mdlib/utils/Common.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,16 @@ public static void sendMessage(CommandSender sender, String message, Placeholder
if (placeholder != null) {
message = placeholder.translate(message);
}
sender.sendMessage(color(message));
// Check if message starts with 'actionbar;'
if (sender instanceof Player player) {
if (message.startsWith("actionbar;")) {
Common.actionBar(player, color(message.replace("actionbar;", "")));
} else {
sender.sendMessage(color(message));
}
} else {
sender.sendMessage(color(message.replace("actionbar;", "")));
}
}

public static List<String> color(List<String> messages) {
Expand Down

0 comments on commit 4d07fa6

Please sign in to comment.