Added sendActionBar(CommandSender sender, String message) method #1
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@
|
||||
### Maven
|
||||
|
||||
target/
|
||||
/bin/
|
||||
|
@ -6,8 +6,10 @@ import java.util.Random;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandMap;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import net.nemez.chatapi.click.CallbackCommand;
|
||||
import net.nemez.chatapi.click.Message;
|
||||
import net.nemez.chatapi.click.PlayerQuitListener;
|
||||
@ -93,6 +95,19 @@ public class ChatAPI
|
||||
sender.sendMessage(colorify(null, message));
|
||||
}
|
||||
|
||||
/** Sends a colorified action bar message to the command sender.
|
||||
*
|
||||
* @param sender the command sender to whom to send the action bar message.
|
||||
* @param message the message to send. */
|
||||
public static void sendActionBar(CommandSender sender, String message)
|
||||
{
|
||||
if (sender instanceof Player)
|
||||
{
|
||||
sender.spigot().sendMessage(new TextComponent(colorify(sender, message)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** Checks if a command sender has the permission node required to send chat messages.
|
||||
*
|
||||
* @param sender the command sender to check.
|
||||
|
Reference in New Issue
Block a user