Use UtilSkull in PunishStaffPage

This commit is contained in:
Spencer 2018-01-03 18:18:31 -05:00 committed by Alexander Meech
parent 27453af867
commit 3ca434fcf6

View File

@ -14,9 +14,9 @@ import mineplex.core.account.CoreClient;
import mineplex.core.common.Pair;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilSkull;
import mineplex.core.common.util.UtilText;
import mineplex.core.common.util.UtilTime;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.punish.Category;
import mineplex.core.punish.Punish;
import mineplex.core.punish.Punishment;
@ -56,14 +56,7 @@ public class PunishStaffPage extends PunishPage
private ItemStack buildPlayerSkull()
{
ItemStack playerSkull = ItemStackFactory.Instance.createPlayerSkull(_target);
ItemMeta playerSkullMeta = playerSkull.getItemMeta();
playerSkullMeta.setDisplayName(C.cGreenB + _target);
playerSkullMeta.setLore(Arrays.asList("", C.mBody + _reason));
playerSkull.setItemMeta(playerSkullMeta);
return playerSkull;
return UtilSkull.getPlayerHead(_target, C.cGreenB, UtilText.splitLine(C.Reset + "Reason: " + C.mBody + _reason, LineFormat.LORE));
}
private ShopItem buildDummyCategoryIcon(Category category)