diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java index 93c8441f48..5cc5074a5e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -596,11 +596,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { IMerchant mcMerchant; IChatBaseComponent name; - int level = 0; - if (merchant instanceof CraftVillager) { - mcMerchant = ((CraftVillager) merchant).getHandle(); - name = ((CraftVillager) merchant).getHandle().getScoreboardDisplayName(); - level = ((CraftVillager) merchant).getHandle().getVillagerData().getLevel(); + int level = 1; // note: using level 0 with active 'is-regular-villager'-flag allows hiding the name suffix + if (merchant instanceof CraftAbstractVillager) { + mcMerchant = ((CraftAbstractVillager) merchant).getHandle(); + name = ((CraftAbstractVillager) merchant).getHandle().getScoreboardDisplayName(); + if (merchant instanceof CraftVillager) { + level = ((CraftVillager) merchant).getHandle().getVillagerData().getLevel(); + } } else if (merchant instanceof CraftMerchantCustom) { mcMerchant = ((CraftMerchantCustom) merchant).getMerchant(); name = ((CraftMerchantCustom) merchant).getMerchant().getScoreboardDisplayName(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java index 311326ee63..e3628237cb 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java @@ -95,7 +95,7 @@ public class CraftMerchantCustom extends CraftMerchant { @Override public boolean eb() { - return true; + return false; // is-regular-villager flag (hides some gui elements: xp bar, name suffix) } @Override