More static please

This commit is contained in:
md_5 2013-06-21 18:57:20 +10:00
parent 2b3dc8d5a8
commit 1e51504654
7 changed files with 23 additions and 23 deletions

View File

@ -1,4 +1,4 @@
From c623ae16ce7c29abf83a755cff088df3542e73a0 Mon Sep 17 00:00:00 2001
From 2a46e61b8c7c63a3940bc25f28203b159bbb7c1c 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
@ -74,7 +74,7 @@ index 00326c1..92c6c88 100644
// Wait for at most 2.5 seconds for plugins to close their threads
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
new file mode 100644
index 0000000..933500d
index 0000000..629224d
--- /dev/null
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -0,0 +1,113 @@
@ -179,7 +179,7 @@ index 0000000..933500d
+ return config.getInt( path, config.getInt( path ) );
+ }
+
+ private <T> List getList(String path, T def)
+ private static <T> List getList(String path, T def)
+ {
+ config.addDefault( path, def );
+ return (List<T>) config.getList( path, config.getList( path ) );

View File

@ -1,4 +1,4 @@
From 6468eb8fe73a0cd8b584dac5bdce503608a035dd Mon Sep 17 00:00:00 2001
From 80ac53c4030eb0a997b72702ce1941afa0907af1 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 3 Feb 2013 12:28:17 +1100
Subject: [PATCH] Highly Optimized Tick Loop
@ -117,7 +117,7 @@ index 0000000..f114a31
+ }
+}
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index cbd05af..3bd93ad 100644
index 81f956c..ec613e3 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -14,6 +14,7 @@ import org.bukkit.Bukkit;
@ -133,7 +133,7 @@ index cbd05af..3bd93ad 100644
preventProxies = getBoolean( "settings.prevent-proxies", false );
}
+
+ private void tpsCommand()
+ private static void tpsCommand()
+ {
+ commands.put( "tps", new TicksPerSecondCommand( "tps" ) );
+ }

View File

@ -1,4 +1,4 @@
From 1de426d2cd4da44ab5a22aca56f2eceac874d2eb Mon Sep 17 00:00:00 2001
From 2a77e3a6d1b400f134c1a2dec60cc503be2b9332 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 21 Jun 2013 18:23:00 +1000
Subject: [PATCH] Netty
@ -350,7 +350,7 @@ index 0000000..386c2f8
+ }
+}
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index af567ac..8d59e39 100644
index 378739e..263cb82 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -6,6 +6,8 @@ import java.io.IOException;
@ -384,7 +384,7 @@ index af567ac..8d59e39 100644
+ }
+ }
+ public static List<Listener> listeners = new ArrayList<Listener>();
+ private void listeners()
+ private static void listeners()
+ {
+ Map<String, Object> def = new HashMap<String, Object>();
+ def.put( "host", "default" );
@ -403,7 +403,7 @@ index af567ac..8d59e39 100644
+ int port = ( info.get( "port" ) instanceof Integer ) ? (Integer) info.get( "port" ) : Bukkit.getPort();
+ boolean netty = (Boolean) info.get( "netty" );
+ long connectionThrottle = ( info.get( "throttle" ) instanceof Number ) ? ( (Number) info.get( "throttle" ) ).longValue() : Bukkit.getConnectionThrottle();
+ this.listeners.add( new Listener( host, port, netty, connectionThrottle ) );
+ listeners.add( new Listener( host, port, netty, connectionThrottle ) );
+ }
+ }
}

View File

@ -1,4 +1,4 @@
From 1b2363993453160576da3b0ec93eeb951a30e3bb Mon Sep 17 00:00:00 2001
From acf178a300ecdb3581ae80151abb9bcc7c396f5d Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 11:15:11 +1100
Subject: [PATCH] BungeeCord Support
@ -75,7 +75,7 @@ index 7cae665..21141f2 100644
public Spigot spigot()
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 8d59e39..d882808 100644
index 263cb82..14a980b 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -7,6 +7,7 @@ import java.lang.reflect.InvocationTargetException;
@ -87,7 +87,7 @@ index 8d59e39..d882808 100644
import java.util.HashMap;
import java.util.List;
@@ -189,4 +190,14 @@ public class SpigotConfig
this.listeners.add( new Listener( host, port, netty, connectionThrottle ) );
listeners.add( new Listener( host, port, netty, connectionThrottle ) );
}
}
+ public static List<String> bungeeAddresses = Arrays.asList( new String[]
@ -95,7 +95,7 @@ index 8d59e39..d882808 100644
+ "127.0.0.1"
+ } );
+ public static boolean bungee = true;
+ private void bungee()
+ private static void bungee()
+ {
+ bungeeAddresses = getList( "settings.bungeecord-addresses", bungee );
+ bungee = getBoolean( "settings.bungeecord", true );

View File

@ -1,4 +1,4 @@
From 8ca478a5293b028b7bbec22ffc24b4465661b5a2 Mon Sep 17 00:00:00 2001
From f87070d3aa96a4d3812eeb10695419ec67bf5c37 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 21 Jun 2013 17:59:22 +1000
Subject: [PATCH] Spam Filter Exclusions
@ -19,7 +19,7 @@ index 998ac8d..a292c1a 100644
Waitable waitable = new Waitable() {
@Override
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index d882808..3918325 100644
index 14a980b..dd02e84 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -200,4 +200,13 @@ public class SpigotConfig
@ -28,7 +28,7 @@ index d882808..3918325 100644
}
+
+ public static List<String> spamExclusions;
+ private void spamExclusions()
+ private static void spamExclusions()
+ {
+ spamExclusions = getList( "commands.spam-exclusions", Arrays.asList( new String[]
+ {

View File

@ -1,4 +1,4 @@
From 34058c02181ad2cf992b6fc702b80d6d47a9ed26 Mon Sep 17 00:00:00 2001
From 6d83cb6ede33f1f2b0e9765270f790bb747f5cd2 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 21 Jun 2013 18:01:29 +1000
Subject: [PATCH] Allow Disabling of Command Logging
@ -23,7 +23,7 @@ index a292c1a..0e8d292 100644
org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot
return;
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 3918325..1329712 100644
index dd02e84..b3875c1 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -209,4 +209,10 @@ public class SpigotConfig
@ -32,7 +32,7 @@ index 3918325..1329712 100644
}
+
+ public static boolean logCommands;
+ private void logCommands()
+ private static void logCommands()
+ {
+ logCommands = getBoolean( "commands.log", true );
+ }

View File

@ -1,4 +1,4 @@
From 0a5f04dd779fd13b8ba468eb224b0a3a44596ecf Mon Sep 17 00:00:00 2001
From 88294560138502bb818d2678ce19888bae1d2d8b Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 21 Jun 2013 18:05:54 +1000
Subject: [PATCH] Allow Disabling of Command TabComplete
@ -18,7 +18,7 @@ index be832ac..3fa8dbe 100644
player.sendMessage(ChatColor.RED + "An internal error occurred while attempting to tab-complete this command");
getLogger().log(Level.SEVERE, "Exception when " + player.getName() + " attempted to tab complete " + message, ex);
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 1329712..55f11a0 100644
index b3875c1..453d0a1 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -215,4 +215,10 @@ public class SpigotConfig
@ -27,7 +27,7 @@ index 1329712..55f11a0 100644
}
+
+ public static boolean tabComplete;
+ private void tabComplete()
+ private static void tabComplete()
+ {
+ tabComplete = getBoolean( "commands.tab-complete", true );
+ }