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,39 +9,43 @@ 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);
|
||||||
|
|
||||||
String getDisplayName(Player player);
|
String getDisplayName(Player player);
|
||||||
|
|
||||||
String getLine(SignChangeEvent event, int line);
|
String getLine(SignChangeEvent event, int line);
|
||||||
|
|
||||||
String getLine(Sign sign, int line);
|
String getLine(Sign sign, int line);
|
||||||
|
|
||||||
void setLine(SignChangeEvent event, int line, String text);
|
void setLine(SignChangeEvent event, int line, String text);
|
||||||
|
|
||||||
void setLine(Sign sign, int line, String text);
|
void setLine(Sign sign, int line, String text);
|
||||||
|
|
||||||
org.bukkit.inventory.Inventory createInventory(InventoryHolder owner, int size, String title);
|
org.bukkit.inventory.Inventory createInventory(InventoryHolder owner, int size, String title);
|
||||||
|
|
||||||
void setLore(ItemMeta meta, List<String> lore);
|
void setLore(ItemMeta meta, List<String> lore);
|
||||||
|
|
||||||
List<String> getLore(ItemMeta meta);
|
List<String> getLore(ItemMeta meta);
|
||||||
|
|
||||||
void setDisplayName(ItemMeta meta, String name);
|
void setDisplayName(ItemMeta meta, String name);
|
||||||
|
|
||||||
default void broadcastMessage(String message) {
|
default void broadcastMessage(String message) {
|
||||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
message = CMIChatColor.translate(message);
|
||||||
player.sendMessage(message);
|
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||||
}
|
player.sendMessage(message);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
default void broadcastMessage(List<String> messages) {
|
default void broadcastMessage(List<String> messages) {
|
||||||
for (String msg : messages) {
|
for (String msg : messages) {
|
||||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
msg = CMIChatColor.translate(msg);
|
||||||
player.sendMessage(msg);
|
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||||
}
|
player.sendMessage(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user