mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-01-03 06:37:47 +01:00
Fixed empty messages sending to chat
This commit is contained in:
parent
6a6f2c0377
commit
21cf8b4ea8
@ -41,11 +41,6 @@ public class FormattedMessage {
|
||||
|
||||
@NotNull
|
||||
public FormattedMessage format(ChatColor prefix, String... toReplace) {
|
||||
|
||||
// Compatibility with #send(Player)
|
||||
if (message.isEmpty())
|
||||
return this;
|
||||
|
||||
message = prefix + message;
|
||||
for (int j = 0; j < toReplace.length; j += 2)
|
||||
message = message.replace(toReplace[j], toReplace[j + 1]);
|
||||
@ -59,7 +54,7 @@ public class FormattedMessage {
|
||||
* @param player Player receiving the message
|
||||
*/
|
||||
public void send(Player player) {
|
||||
if (message.isEmpty())
|
||||
if (ChatColor.stripColor(message).isEmpty())
|
||||
return;
|
||||
|
||||
if (actionBar) {
|
||||
|
Loading…
Reference in New Issue
Block a user