Fix Inventory#getViewers on the player inventory not returning the player first time their inventory is opened

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-06-20 09:27:32 +10:00
parent 41524cf726
commit 66df1397b3
4 changed files with 64 additions and 62 deletions

View File

@@ -246,7 +246,7 @@
+ }
+
+ if (this.oldLevel != this.experienceLevel) {
+ CraftEventFactory.callPlayerLevelChangeEvent(this.level.getCraftServer().getPlayer((EntityPlayer) this), this.oldLevel, this.experienceLevel);
+ CraftEventFactory.callPlayerLevelChangeEvent(this.getBukkitEntity(), this.oldLevel, this.experienceLevel);
+ this.oldLevel = this.experienceLevel;
+ }
+ // CraftBukkit end