mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
461353e2cb
This was useful when plugins first started upgrading to uuid because each plugin would implement their own way for grabbing uuid's from mojang. Because none of them shared the result they would quickly hit the limits on the api causing the conversion to either fail or pause for long periods of time. The global api cache was a (very hacky) way to force all plugins to share a cache but caused a few issues with plugins that expected a full implementation of the HTTPURLConnection. Due to the fact that most servers/plugins have updated now it seems to be a good time to remove this as its usefulness mostly has expired.
22 lines
1009 B
Diff
22 lines
1009 B
Diff
From 9368d77a99cb9630efbddf2db873dd0f7a97ee1a Mon Sep 17 00:00:00 2001
|
|
From: md_5 <git@md-5.net>
|
|
Date: Tue, 30 Sep 2014 21:49:10 +1000
|
|
Subject: [PATCH] Don't Fire InventoryCloseEvent Unless Required
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
index f057a91..72baeba 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
@@ -833,6 +833,7 @@ public class CraftEventFactory {
|
|
}
|
|
|
|
public static void handleInventoryCloseEvent(EntityHuman human) {
|
|
+ if (human.activeContainer == human.defaultContainer) return; // Spigot
|
|
InventoryCloseEvent event = new InventoryCloseEvent(human.activeContainer.getBukkitView());
|
|
human.world.getServer().getPluginManager().callEvent(event);
|
|
human.activeContainer.transferTo(human.defaultContainer, human.getBukkitEntity());
|
|
--
|
|
2.1.0
|
|
|