Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions src/main/java/com/hazebyte/crate/api/util/Messenger.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,11 @@ public static boolean tell (Player player, String msg) {
return tell((CommandSender) player, msg);
}

public static boolean tell(CommandSender sender, BaseComponent msg) {
return tell(sender, msg, null); // Hack to handle overloading call
}

public static boolean tell (CommandSender sender, BaseComponent... msg) {
if (sender == null || msg == null) {
public static boolean tell (CommandSender sender, BaseComponent... components) {
if (sender == null || components == null) {
return false;
}

for (BaseComponent m : msg) {
if (m instanceof TextComponent) {
tell(sender, (TextComponent) m);
}
}
sender.spigot().sendMessage(components);
Copy link
Collaborator

@imWillX imWillX Nov 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change isn't compatible with spigot 1.8.

CommandSender does not have a spigot field, unfortunately.

return true;
}

Expand Down