mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
cab333b217
Don't send requests of every player was found in the global api cache SpigotMC/Spigot@841270ff1e Correctly set the response code for the cached lookups and return the ... SpigotMC/Spigot@f170b7899c Don't try and re-set the global api cache on reload SpigotMC/Spigot@b410a00a66 Use a compile time sneaky throw hack. SpigotMC/Spigot@508462b96b Fix a missed rename in WorldGenGroundBush SpigotMC/Spigot@0614d8fae9
39 lines
1.6 KiB
Diff
39 lines
1.6 KiB
Diff
From 1516f2ee15c86afee40f177aafd6be011cbb8412 Mon Sep 17 00:00:00 2001
|
|
From: md_5 <md_5@live.com.au>
|
|
Date: Sun, 22 Sep 2013 19:10:53 +1000
|
|
Subject: [PATCH] Item Despawn Rate
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
|
index c8c0d6a..a45bed9 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
|
@@ -104,7 +104,7 @@ public class EntityItem extends Entity {
|
|
}
|
|
|
|
// ++this.age; // CraftBukkit - Moved up
|
|
- if (!this.world.isStatic && this.age >= 6000) {
|
|
+ if (!this.world.isStatic && this.age >= world.spigotConfig.itemDespawnRate) { // Spigot
|
|
// CraftBukkit start - fire ItemDespawnEvent
|
|
if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
|
|
this.age = 0;
|
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
index 48ae475..6d31363 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
@@ -198,4 +198,11 @@ public class SpigotWorldConfig
|
|
log( "*** WARNING *** Please use this option with caution, SpigotMC is not responsible for any issues this option may cause in the future!" );
|
|
}
|
|
}
|
|
+
|
|
+ public int itemDespawnRate;
|
|
+ private void itemDespawnRate()
|
|
+ {
|
|
+ itemDespawnRate = getInt( "item-despawn-rate", 6000 );
|
|
+ log( "Item Despawn Rate: " + itemDespawnRate );
|
|
+ }
|
|
}
|
|
--
|
|
1.9.1
|
|
|