From da6755f7030b610d3bde5fa44c3a0ebc37b4ac41 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Thu, 29 Mar 2012 18:44:30 -0700 Subject: [PATCH] I always forget to add the new file ;_; --- .../gmail/nossr50/runnables/SpoutStart.java | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/main/java/com/gmail/nossr50/runnables/SpoutStart.java diff --git a/src/main/java/com/gmail/nossr50/runnables/SpoutStart.java b/src/main/java/com/gmail/nossr50/runnables/SpoutStart.java new file mode 100644 index 000000000..f90561179 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/runnables/SpoutStart.java @@ -0,0 +1,38 @@ +package com.gmail.nossr50.runnables; + +import org.bukkit.Bukkit; +import org.getspout.spoutapi.SpoutManager; +import org.getspout.spoutapi.player.FileManager; + +import com.gmail.nossr50.mcMMO; +import com.gmail.nossr50.config.LoadProperties; +import com.gmail.nossr50.spout.SpoutStuff; + +public class SpoutStart implements Runnable{ + + mcMMO plugin; + + public SpoutStart(mcMMO m) { + plugin = m; + } + + @Override + public void run() { + if (Bukkit.getPluginManager().getPlugin("Spout") != null) { + LoadProperties.spoutEnabled = true; + } + else { + LoadProperties.spoutEnabled = false; + } + + //Spout Stuff + if (LoadProperties.spoutEnabled) { + SpoutStuff.setupSpoutConfigs(); + SpoutStuff.registerCustomEvent(); + SpoutStuff.extractFiles(); //Extract source materials + + FileManager FM = SpoutManager.getFileManager(); + FM.addToPreLoginCache(plugin, SpoutStuff.getFiles()); + } + } +}