mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-25 01:31:29 +01:00
SPIGOT-5037: Player.openMerchant does not show merchant level
By: md_5 <git@md-5.net>
This commit is contained in:
parent
2fdf052be1
commit
223b5e4c95
@ -596,9 +596,11 @@ 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();
|
||||
} else if (merchant instanceof CraftMerchantCustom) {
|
||||
mcMerchant = ((CraftMerchantCustom) merchant).getMerchant();
|
||||
name = ((CraftMerchantCustom) merchant).getMerchant().getScoreboardDisplayName();
|
||||
@ -607,7 +609,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
}
|
||||
|
||||
mcMerchant.setTradingPlayer(this.getHandle());
|
||||
mcMerchant.openTrade(this.getHandle(), name, 0);
|
||||
mcMerchant.openTrade(this.getHandle(), name, level);
|
||||
|
||||
return this.getHandle().activeContainer.getBukkitView();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user