Removed Common Class
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
package dev.zxq5.fantasysmp.items.presets;
|
package dev.zxq5.fantasysmp.items.presets;
|
||||||
|
|
||||||
import dev.zxq5.fantasysmp.Fantasysmp;
|
import dev.zxq5.fantasysmp.Fantasysmp;
|
||||||
import dev.zxq5.fantasysmp.util.Common;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
@@ -42,9 +42,9 @@ public abstract class CustomItem {
|
|||||||
ItemMeta itemMeta = itemStack.getItemMeta();
|
ItemMeta itemMeta = itemStack.getItemMeta();
|
||||||
PersistentDataContainer container = itemMeta.getPersistentDataContainer();
|
PersistentDataContainer container = itemMeta.getPersistentDataContainer();
|
||||||
|
|
||||||
itemMeta.setDisplayName(Common.colorize(getName()));
|
itemMeta.setDisplayName(ChatColor.translateAlternateColorCodes('&', getName()));
|
||||||
List<String> lore = new ArrayList<>();
|
List<String> lore = new ArrayList<>();
|
||||||
getLore().forEach(l-> lore.add(Common.colorize(l)));
|
getLore().forEach(l-> lore.add(ChatColor.translateAlternateColorCodes('&', l)));
|
||||||
itemMeta.setLore(lore);
|
itemMeta.setLore(lore);
|
||||||
|
|
||||||
itemMeta = setStats(itemMeta);
|
itemMeta = setStats(itemMeta);
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
package dev.zxq5.fantasysmp.util;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
|
|
||||||
public class Common {
|
|
||||||
|
|
||||||
private Common(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String colorize(String string) {
|
|
||||||
return ChatColor.translateAlternateColorCodes('&', string);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user