mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 14:05:25 +01:00
Fix for hex color codes not being processed with new chat management
This commit is contained in:
parent
f7972eb1e3
commit
ed9fe4d26e
@ -933,7 +933,7 @@ public class ConfigManager {
|
|||||||
} else if (guiSection.isInt("Id") && guiSection.isInt("Data")) {
|
} else if (guiSection.isInt("Id") && guiSection.isInt("Data")) {
|
||||||
guiItem = CMIMaterial.get(guiSection.getInt("Id"), guiSection.getInt("Data")).newItemStack();
|
guiItem = CMIMaterial.get(guiSection.getInt("Id"), guiSection.getInt("Data")).newItemStack();
|
||||||
} else
|
} else
|
||||||
log.warning("Job " + jobKey + " has an invalid Gui property. Please fix this if you want to use it!");
|
log.warning("Job " + jobKey + " has an invalid ("+guiSection.getString("Item")+") Gui property. Please fix this if you want to use it!");
|
||||||
|
|
||||||
for (String str4 : guiSection.getStringList("Enchantments")) {
|
for (String str4 : guiSection.getStringList("Enchantments")) {
|
||||||
String[] id = str4.split(":", 2);
|
String[] id = str4.split(":", 2);
|
||||||
|
@ -9,6 +9,8 @@ import org.bukkit.event.block.SignChangeEvent;
|
|||||||
import org.bukkit.inventory.InventoryHolder;
|
import org.bukkit.inventory.InventoryHolder;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
||||||
|
import com.gamingmesh.jobs.CMILib.CMIChatColor;
|
||||||
|
|
||||||
public interface Complement {
|
public interface Complement {
|
||||||
|
|
||||||
String getDisplayName(ItemMeta meta);
|
String getDisplayName(ItemMeta meta);
|
||||||
@ -32,6 +34,7 @@ public interface Complement {
|
|||||||
void setDisplayName(ItemMeta meta, String name);
|
void setDisplayName(ItemMeta meta, String name);
|
||||||
|
|
||||||
default void broadcastMessage(String message) {
|
default void broadcastMessage(String message) {
|
||||||
|
message = CMIChatColor.translate(message);
|
||||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||||
player.sendMessage(message);
|
player.sendMessage(message);
|
||||||
}
|
}
|
||||||
@ -39,6 +42,7 @@ public interface Complement {
|
|||||||
|
|
||||||
default void broadcastMessage(List<String> messages) {
|
default void broadcastMessage(List<String> messages) {
|
||||||
for (String msg : messages) {
|
for (String msg : messages) {
|
||||||
|
msg = CMIChatColor.translate(msg);
|
||||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||||
player.sendMessage(msg);
|
player.sendMessage(msg);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user