mirror of
https://github.com/kiranhart/Auction-House.git
synced 2024-11-25 05:55:13 +01:00
🎨 remove force &f color in getItemName method for items that don't have a custom/coloured name
Took 57 seconds
This commit is contained in:
parent
df128270a7
commit
fff6a3f9be
@ -27,11 +27,10 @@ import ca.tweetzy.auctionhouse.settings.Settings;
|
||||
import ca.tweetzy.core.compatibility.ServerVersion;
|
||||
import ca.tweetzy.core.compatibility.XMaterial;
|
||||
import ca.tweetzy.core.hooks.EconomyManager;
|
||||
import ca.tweetzy.core.utils.TextUtils;
|
||||
import ca.tweetzy.core.utils.items.ItemUtils;
|
||||
import ca.tweetzy.flight.nbtapi.NBT;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import ca.tweetzy.flight.nbtapi.NBT;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang.WordUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -266,7 +265,7 @@ public class AuctionAPI {
|
||||
*/
|
||||
public String getItemName(ItemStack stack) {
|
||||
Objects.requireNonNull(stack, "Item stack cannot be null when getting name");
|
||||
final String name = stack.getItemMeta().hasDisplayName() ? stack.getItemMeta().getDisplayName() : TextUtils.formatText("&f" + WordUtils.capitalize(stack.getType().name().toLowerCase().replace("_", " ")));
|
||||
final String name = stack.getItemMeta().hasDisplayName() ? stack.getItemMeta().getDisplayName() : WordUtils.capitalize(stack.getType().name().toLowerCase().replace("_", " "));
|
||||
return name;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user