2012-03-30 03:44:30 +02:00
|
|
|
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{
|
2012-04-01 06:11:57 +02:00
|
|
|
private final mcMMO plugin;
|
|
|
|
|
2012-03-30 03:44:30 +02:00
|
|
|
public SpoutStart(mcMMO m) {
|
2012-04-01 06:11:57 +02:00
|
|
|
this.plugin = m;
|
2012-03-30 03:44:30 +02:00
|
|
|
}
|
2012-04-01 06:11:57 +02:00
|
|
|
|
2012-03-30 03:44:30 +02:00
|
|
|
@Override
|
|
|
|
public void run() {
|
|
|
|
if (Bukkit.getPluginManager().getPlugin("Spout") != null) {
|
|
|
|
LoadProperties.spoutEnabled = true;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
LoadProperties.spoutEnabled = false;
|
|
|
|
}
|
2012-04-01 06:11:57 +02:00
|
|
|
|
2012-03-30 03:44:30 +02:00
|
|
|
//Spout Stuff
|
|
|
|
if (LoadProperties.spoutEnabled) {
|
|
|
|
SpoutStuff.setupSpoutConfigs();
|
|
|
|
SpoutStuff.registerCustomEvent();
|
|
|
|
SpoutStuff.extractFiles(); //Extract source materials
|
|
|
|
|
|
|
|
FileManager FM = SpoutManager.getFileManager();
|
|
|
|
FM.addToPreLoginCache(plugin, SpoutStuff.getFiles());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|