Ping sending patch done

By: md_5 <md_5@live.com.au>
This commit is contained in:
Spigot
2013-06-21 17:41:26 +10:00
parent d9b3e950cd
commit 264d66fab5
4 changed files with 30 additions and 31 deletions

View File

@@ -1,4 +1,4 @@
From 0abff71f90ac188f2bc11f81faa224f58179f1c8 Mon Sep 17 00:00:00 2001
From ba981dd9b929cf59480d214ed9de8cd79c3bdbbc Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Thu, 20 Jun 2013 17:35:57 +1000
Subject: [PATCH] Spigot Configuration
@@ -38,7 +38,7 @@ index 3a4ddea..de052bd 100644
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
new file mode 100644
index 0000000..bf297bc
index 0000000..43d94fe
--- /dev/null
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -0,0 +1,98 @@
@@ -128,7 +128,7 @@ index 0000000..bf297bc
+ return config.getInt( path, config.getInt( path ) );
+ }
+
+ private <T> List<T> getList(String path, T def)
+ private <T> List getList(String path, T def)
+ {
+ config.addDefault( path, def );
+ return (List<T>) config.getList( path, config.getList( path ) );
@@ -142,7 +142,7 @@ index 0000000..bf297bc
+}
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
new file mode 100644
index 0000000..6642e86
index 0000000..facea4f
--- /dev/null
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -0,0 +1,63 @@
@@ -197,7 +197,7 @@ index 0000000..6642e86
+ return config.getInt( "world-settings." + worldName + "." + path, config.getInt( "world-settings.default." + path ) );
+ }
+
+ private <T> List<T> getList(String path, T def)
+ private <T> List getList(String path, T def)
+ {
+ config.addDefault( "world-settings.default." + path, def );
+ return (List<T>) config.getList( "world-settings." + worldName + "." + path, config.getList( "world-settings.default." + path ) );