mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 07:49:03 +00:00
Show Effects on Potion, Changed Lore
This commit is contained in:
@@ -108,7 +108,7 @@ public class P extends JavaPlugin {
|
||||
}
|
||||
|
||||
public void msg(CommandSender sender, String msg) {
|
||||
sender.sendMessage(ChatColor.DARK_GREEN + "[Brewery] " + ChatColor.WHITE + msg);
|
||||
sender.sendMessage(color("&2[Brewery] &f" + msg));
|
||||
}
|
||||
|
||||
public void log(String msg) {
|
||||
@@ -459,21 +459,46 @@ public class P extends JavaPlugin {
|
||||
page = 1;
|
||||
}
|
||||
|
||||
sender.sendMessage(ChatColor.GRAY + "-------------- " + ChatColor.WHITE + "Seite " + ChatColor.GOLD + page + ChatColor.WHITE + "/" + ChatColor.GOLD + pages + ChatColor.GRAY + " --------------");
|
||||
sender.sendMessage(color("&7-------------- &fSeite &6" + page + "&f/&6" + pages + " &7--------------"));
|
||||
|
||||
ListIterator<String> iter = strings.listIterator((page - 1) * 7);
|
||||
|
||||
for (int i = 0; i < 7; i++) {
|
||||
if (iter.hasNext()) {
|
||||
sender.sendMessage(iter.next());
|
||||
sender.sendMessage(color(iter.next()));
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String white() {
|
||||
return ChatColor.WHITE.toString();
|
||||
public String color(String msg) {
|
||||
if (msg != null) {
|
||||
msg = msg.replace("&0", ChatColor.getByChar("0").toString());
|
||||
msg = msg.replace("&1", ChatColor.getByChar("1").toString());
|
||||
msg = msg.replace("&2", ChatColor.getByChar("2").toString());
|
||||
msg = msg.replace("&3", ChatColor.getByChar("3").toString());
|
||||
msg = msg.replace("&4", ChatColor.getByChar("4").toString());
|
||||
msg = msg.replace("&5", ChatColor.getByChar("5").toString());
|
||||
msg = msg.replace("&6", ChatColor.getByChar("6").toString());
|
||||
msg = msg.replace("&7", ChatColor.getByChar("7").toString());
|
||||
msg = msg.replace("&8", ChatColor.getByChar("8").toString());
|
||||
msg = msg.replace("&9", ChatColor.getByChar("9").toString());
|
||||
msg = msg.replace("&a", ChatColor.getByChar("a").toString());
|
||||
msg = msg.replace("&b", ChatColor.getByChar("b").toString());
|
||||
msg = msg.replace("&c", ChatColor.getByChar("c").toString());
|
||||
msg = msg.replace("&d", ChatColor.getByChar("d").toString());
|
||||
msg = msg.replace("&e", ChatColor.getByChar("e").toString());
|
||||
msg = msg.replace("&f", ChatColor.getByChar("f").toString());
|
||||
msg = msg.replace("&k", ChatColor.getByChar("k").toString());
|
||||
msg = msg.replace("&l", ChatColor.getByChar("l").toString());
|
||||
msg = msg.replace("&m", ChatColor.getByChar("m").toString());
|
||||
msg = msg.replace("&n", ChatColor.getByChar("n").toString());
|
||||
msg = msg.replace("&o", ChatColor.getByChar("o").toString());
|
||||
msg = msg.replace("&r", ChatColor.getByChar("r").toString());
|
||||
}
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user