*Added Votifier Support (only work with BungeeCord)

This commit is contained in:
Lukas
2015-01-04 16:41:36 +01:00
parent cf6c298776
commit 7c39188903
2 changed files with 4 additions and 1 deletions

View File

@@ -72,6 +72,8 @@ public class AnuraCore extends JavaPlugin {
Setup.setupCommands();
if (this.getConfig().getBoolean("is-main-lobby")) {
Setup.setupXPBattle();
}
if (this.getConfig().getBoolean("enable-votifier")) {
Setup.setupVotifier();
}
this.getServer().getMessenger().registerIncomingPluginChannel(this, "BungeeCord", signs);

View File

@@ -46,6 +46,7 @@ public class Setup {
c.addDefault("spawn.Z", 0);
c.addDefault("spawn.yaw", 0d);
c.addDefault("spawn.pitch", 0d);
c.addDefault("enable-votifier", false);
c.options().copyDefaults(true);
c.options().header("Config File of the Anura Core-Plugin:");
}
@@ -313,7 +314,7 @@ public class Setup {
}
public static void setupVotifier() {
AnuraCore.getInstance().getServer().getPluginManager().registerEvents(new de.anura.core.events.VotifierListener(), AnuraCore.getInstance());
AnuraCore.getInstance().getServer().getPluginManager().registerEvents(new VotifierListener(), AnuraCore.getInstance());
AnuraCore.getInstance().getServer().getMessenger().registerIncomingPluginChannel(AnuraCore.getInstance(), "BungeeCord", new VotifierListener());
}
}