More robust inventory handling

This commit is contained in:
md_5 2017-01-04 10:04:27 +11:00
parent 613be0d841
commit 63b5f7d338

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();