mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
Don't populate a useless spigot.yml field (#6976)
This commit is contained in:
parent
a89a84e6dd
commit
d1eed05360
3 changed files with 24 additions and 3 deletions
|
@ -15,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", 8) );
|
||||
maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", this.maxCollisionsPerEntity, false) );
|
||||
log( "Max Entity Collisions: " + maxCollisionsPerEntity );
|
||||
}
|
||||
+
|
||||
|
|
|
@ -20,9 +20,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
}
|
||||
+
|
||||
+ public int maxCollisionsPerEntity;
|
||||
+ public int maxCollisionsPerEntity = 8;
|
||||
+ private void maxEntityCollision() {
|
||||
+ maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", 8) );
|
||||
+ maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", this.maxCollisionsPerEntity, false) );
|
||||
+ log( "Max Entity Collisions: " + maxCollisionsPerEntity );
|
||||
+ }
|
||||
}
|
||||
|
|
|
@ -795,3 +795,24 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
};
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class SpigotWorldConfig
|
||||
|
||||
public int getInt(String path, int def)
|
||||
{
|
||||
- this.config.addDefault( "world-settings.default." + path, def );
|
||||
- return this.config.getInt( "world-settings." + this.worldName + "." + path, this.config.getInt( "world-settings.default." + path ) );
|
||||
+ // Paper start - get int without setting default
|
||||
+ return this.getInt(path, def, true);
|
||||
+ }
|
||||
+ public int getInt(String path, int def, boolean setDef)
|
||||
+ {
|
||||
+ if (setDef) this.config.addDefault( "world-settings.default." + path, def );
|
||||
+ return this.config.getInt( "world-settings." + this.worldName + "." + path, this.config.getInt( "world-settings.default." + path, def ) );
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
public <T> List getList(String path, T def)
|
||||
|
|
Loading…
Reference in a new issue