use of net.dzikoysk.funnyguilds.config.MessageConfiguration in project FunnyGuilds by FunnyGuilds.
the class WarUtils method message.
public static void message(Player player, int i, Object... values) {
MessageConfiguration messages = FunnyGuilds.getInstance().getMessageConfiguration();
String message = null;
switch(i) {
case 0:
message = messages.warHasNotGuild;
break;
case 1:
message = messages.warAlly;
break;
case 2:
message = messages.warWait;
message = StringUtils.replace(message, "{TIME}", TimeUtils.getDurationBreakdown((long) values[0]));
break;
case 3:
message = messages.warAttacker;
message = StringUtils.replace(message, "{ATTACKED}", ((Guild) values[0]).getTag());
break;
case 4:
message = messages.warAttacked;
message = StringUtils.replace(message, "{ATTACKER}", ((Guild) values[0]).getTag());
break;
case 5:
message = messages.warDisabled;
break;
default:
throw new IllegalArgumentException("Unknown magic number " + i);
}
ChatUtils.sendMessage(player, message);
}
use of net.dzikoysk.funnyguilds.config.MessageConfiguration in project FunnyGuilds by FunnyGuilds.
the class SecurityUtils method sendToOperator.
public static void sendToOperator(Player player, String cheat, String note) {
MessageConfiguration messages = FunnyGuilds.getInstance().getMessageConfiguration();
String message = messages.securitySystemPrefix + messages.securitySystemInfo;
String messageNote = messages.securitySystemPrefix + messages.securitySystemNote;
message = StringUtils.replace(message, "{PLAYER}", player.getName());
message = StringUtils.replace(message, "{CHEAT}", cheat);
messageNote = StringUtils.replace(messageNote, "{NOTE}", note);
Bukkit.broadcast(ChatUtils.colored(message), "funnyguilds.admin");
Bukkit.broadcast(ChatUtils.colored(messageNote), "funnyguilds.admin");
}
Aggregations