Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 13:00:06 +01:00
Allow configuration of Item Despawn Rate
Dieser Commit ist enthalten in:
Ursprung
fb8af9e2bb
Commit
01c7aec9a5
38
CraftBukkit-Patches/0073-Item-Despawn-Rate.patch
Normale Datei
38
CraftBukkit-Patches/0073-Item-Despawn-Rate.patch
Normale Datei
@ -0,0 +1,38 @@
|
|||||||
|
From a506a78c0160d17ca9b1a9e8fcaa17718a2e7678 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 24c44ad..52878ff 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
||||||
|
@@ -100,7 +100,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) {
|
||||||
|
// CraftBukkit start
|
||||||
|
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 a34670e..4631165 100644
|
||||||
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||||
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||||
|
@@ -219,4 +219,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.8.1.2
|
||||||
|
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren