From 4dc98a7a9954aa33ee61797408d4ece977c0053c Mon Sep 17 00:00:00 2001 From: md_5 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 65a03df..d6d83fe 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -109,7 +109,7 @@ public class EntityItem extends Entity { this.W(); - if (!this.world.isClientSide && this.age >= 6000) { + if (!this.world.isClientSide && 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 0d5c9d0..a5786ea 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 ); + } } -- 2.1.0