Skip to content

Commit

Permalink
Fixed broken polar bear skin.
Browse files Browse the repository at this point in the history
  • Loading branch information
me4502 committed Sep 28, 2017
1 parent dab5693 commit f5d117e
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -8,7 +8,7 @@
import com.sk89q.craftbook.util.ItemUtil;
import com.sk89q.craftbook.util.ProtectionUtil;
import com.sk89q.util.yaml.YAMLProcessor;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.WordUtils;
import org.bukkit.ChatColor;
import org.bukkit.GameMode;
import org.bukkit.Material;
Expand Down Expand Up @@ -127,7 +127,7 @@ else if (typeName == null)
ItemMeta metaD = toDrop.getItemMeta();
if(metaD instanceof SkullMeta) {
SkullMeta itemMeta = (SkullMeta) metaD;
itemMeta.setDisplayName(ChatColor.RESET + typeName + " Head");
itemMeta.setDisplayName(ChatColor.RESET + WordUtils.capitalize(typeName.replace("_", " ")) + " Head");
itemMeta.setOwner(mobName);
toDrop.setItemMeta(itemMeta);
} else
Expand Down Expand Up @@ -200,7 +200,7 @@ public void onBlockBreak(BlockBreakEvent event) {
}

if(type != null)
meta.setDisplayName(ChatColor.RESET + StringUtils.replace(type.getName(), "_", " ") + " Head");
meta.setDisplayName(ChatColor.RESET + WordUtils.capitalize(type.getName().replace("_", " ")) + " Head");
else
meta.setDisplayName(ChatColor.RESET + playerName + "'s Head");

Expand Down Expand Up @@ -251,7 +251,7 @@ protected enum MobSkullType {
SNOWMAN("Koebasti", "scraftbrothers2"),
HORSE("gavertoso"),
WITCH("scrafbrothers4"),
POLAR_BEAR("_DmacK_");
POLAR_BEAR("ice_bear", "_DmacK_");

MobSkullType(String playerName, String ... oldNames) {

Expand Down

0 comments on commit f5d117e

Please sign in to comment.