mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 21:56:47 +01:00
f4dd7ff483
Spout was installed.
41 lines
1.1 KiB
Java
41 lines
1.1 KiB
Java
package com.gmail.nossr50.runnables;
|
|
|
|
import org.getspout.spoutapi.SpoutManager;
|
|
import org.getspout.spoutapi.player.FileManager;
|
|
|
|
import com.gmail.nossr50.mcMMO;
|
|
import com.gmail.nossr50.config.SpoutConfig;
|
|
import com.gmail.nossr50.spout.SpoutStuff;
|
|
|
|
public class SpoutStart implements Runnable{
|
|
private final mcMMO plugin;
|
|
|
|
public SpoutStart(final mcMMO plugin) {
|
|
this.plugin = plugin;
|
|
}
|
|
|
|
@Override
|
|
public void run() {
|
|
if (plugin.getServer().getPluginManager().getPlugin("Spout") != null) {
|
|
mcMMO.spoutEnabled = true;
|
|
}
|
|
else {
|
|
mcMMO.spoutEnabled = false;
|
|
}
|
|
|
|
//Spout Stuff
|
|
if (mcMMO.spoutEnabled) {
|
|
SpoutConfig.getInstance();
|
|
SpoutStuff.setupSpoutConfigs();
|
|
SpoutStuff.registerCustomEvent();
|
|
SpoutStuff.extractFiles(); //Extract source materials
|
|
|
|
FileManager FM = SpoutManager.getFileManager();
|
|
FM.addToPreLoginCache(plugin, SpoutStuff.getFiles());
|
|
|
|
//Handle spout players after a /reload
|
|
SpoutStuff.reloadSpoutPlayers();
|
|
}
|
|
}
|
|
}
|