*Added Votifier Support (only work with BungeeCord)
This commit is contained in:
@@ -72,6 +72,8 @@ public class AnuraCore extends JavaPlugin {
|
|||||||
Setup.setupCommands();
|
Setup.setupCommands();
|
||||||
if (this.getConfig().getBoolean("is-main-lobby")) {
|
if (this.getConfig().getBoolean("is-main-lobby")) {
|
||||||
Setup.setupXPBattle();
|
Setup.setupXPBattle();
|
||||||
|
}
|
||||||
|
if (this.getConfig().getBoolean("enable-votifier")) {
|
||||||
Setup.setupVotifier();
|
Setup.setupVotifier();
|
||||||
}
|
}
|
||||||
this.getServer().getMessenger().registerIncomingPluginChannel(this, "BungeeCord", signs);
|
this.getServer().getMessenger().registerIncomingPluginChannel(this, "BungeeCord", signs);
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ public class Setup {
|
|||||||
c.addDefault("spawn.Z", 0);
|
c.addDefault("spawn.Z", 0);
|
||||||
c.addDefault("spawn.yaw", 0d);
|
c.addDefault("spawn.yaw", 0d);
|
||||||
c.addDefault("spawn.pitch", 0d);
|
c.addDefault("spawn.pitch", 0d);
|
||||||
|
c.addDefault("enable-votifier", false);
|
||||||
c.options().copyDefaults(true);
|
c.options().copyDefaults(true);
|
||||||
c.options().header("Config File of the Anura Core-Plugin:");
|
c.options().header("Config File of the Anura Core-Plugin:");
|
||||||
}
|
}
|
||||||
@@ -313,7 +314,7 @@ public class Setup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void setupVotifier() {
|
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());
|
AnuraCore.getInstance().getServer().getMessenger().registerIncomingPluginChannel(AnuraCore.getInstance(), "BungeeCord", new VotifierListener());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user