More robust inventory handling

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2017-01-04 10:04:27 +11:00
parent a1cc3a4382
commit 44f4a83e59

View File

@ -1129,8 +1129,9 @@
PlayerConnectionUtils.ensureMainThread(packetplayinwindowclick, this, this.player.x());
+ if (this.player.isFrozen()) return; // CraftBukkit
this.player.resetIdleTimer();
if (this.player.activeContainer.windowId == packetplayinwindowclick.a() && this.player.activeContainer.c(this.player)) {
- if (this.player.activeContainer.windowId == packetplayinwindowclick.a() && this.player.activeContainer.c(this.player)) {
- if (this.player.isSpectator()) {
+ if (this.player.activeContainer.windowId == packetplayinwindowclick.a() && this.player.activeContainer.c(this.player) && this.player.activeContainer.a(this.player)) { // CraftBukkit
+ boolean cancelled = this.player.isSpectator(); // CraftBukkit - see below if
+ if (false/*this.player.isSpectator()*/) { // CraftBukkit
NonNullList nonnulllist = NonNullList.a();