Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-17 21:40:08 +01:00
a4647a8a71
Fix empty `ench` tags being wiped by the meta system SpigotMC/Spigot@cc9a1a417f Add Hunger Config Values SpigotMC/Spigot@2cd515e224 Make debug logging togglable SpigotMC/Spigot@d31b1d616f Spigot has implemented a system of hunger exhaustion similar to ours, as such a lot of config values have been moved there. Our exhaustion patch has been trimmed and only a few values for exhaustion remain in paper.yml, the others now sit in spigot.yml
53 Zeilen
1.8 KiB
Diff
53 Zeilen
1.8 KiB
Diff
From cbfc57150639ba9254c567c4391904aa5ba6967b Mon Sep 17 00:00:00 2001
|
|
From: md_5 <git@md-5.net>
|
|
Date: Sun, 10 Aug 2014 11:01:02 +1000
|
|
Subject: [PATCH] Force Close Inventory On Move
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
index 0e2bc03..e8bfc41 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
@@ -489,6 +489,12 @@ public class PlayerConnection implements PacketPlayInListener {
|
|
|
|
public void a(PacketPlayInBlockDig packetplayinblockdig) {
|
|
if (this.player.dead) return; // CraftBukkit
|
|
+ // Spigot start
|
|
+ if ( player.activeContainer != player.defaultContainer )
|
|
+ {
|
|
+ getPlayer().closeInventory();
|
|
+ }
|
|
+ // Spigot end
|
|
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
|
|
|
this.player.v();
|
|
@@ -615,6 +621,12 @@ public class PlayerConnection implements PacketPlayInListener {
|
|
// a notch bug where the item doesn't update correctly.
|
|
boolean always = false;
|
|
// CraftBukkit end
|
|
+ // Spigot start
|
|
+ if ( player.activeContainer != player.defaultContainer )
|
|
+ {
|
|
+ getPlayer().closeInventory();
|
|
+ }
|
|
+ // Spigot end
|
|
|
|
ItemStack itemstack = this.player.inventory.getItemInHand();
|
|
boolean flag = false;
|
|
@@ -1118,6 +1130,12 @@ public class PlayerConnection implements PacketPlayInListener {
|
|
return;
|
|
}
|
|
// Spigot End
|
|
+ // Spigot start
|
|
+ if ( player.activeContainer != player.defaultContainer )
|
|
+ {
|
|
+ getPlayer().closeInventory();
|
|
+ }
|
|
+ // Spigot end
|
|
|
|
this.player.v();
|
|
if (entity != null) {
|
|
--
|
|
1.9.1
|
|
|