mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-25 03:25:13 +01:00
31 lines
738 B
Java
31 lines
738 B
Java
|
package com.Acrobot.Breeze.Utils;
|
||
|
|
||
|
import com.Acrobot.ChestShop.Config.Config;
|
||
|
import com.Acrobot.ChestShop.Config.Language;
|
||
|
import org.bukkit.Bukkit;
|
||
|
import org.bukkit.command.CommandSender;
|
||
|
import org.bukkit.entity.Player;
|
||
|
|
||
|
/**
|
||
|
* @author Acrobot
|
||
|
*/
|
||
|
public class MessageUtil {
|
||
|
public static void sendMessage(CommandSender sender, Language message) {
|
||
|
String toSend = Config.getLocal(message);
|
||
|
|
||
|
sender.sendMessage(toSend);
|
||
|
}
|
||
|
|
||
|
public static boolean sendMessage(String playerName, Language message) {
|
||
|
Player player = Bukkit.getPlayer(playerName);
|
||
|
|
||
|
if (player != null) {
|
||
|
sendMessage(player, message);
|
||
|
} else {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
return true;
|
||
|
}
|
||
|
}
|