SubServers-2/SubServers.Bungee/common/src/net/ME1312/SubServers/Bungee/BungeeCommon.java

45 lines
1.0 KiB
Java
Raw Normal View History

2020-11-14 04:41:56 +01:00
package net.ME1312.SubServers.Bungee;
import net.md_5.bungee.BungeeCord;
import net.md_5.bungee.api.config.ServerInfo;
import java.io.IOException;
import java.util.Map;
import java.util.function.Supplier;
2020-11-14 04:41:56 +01:00
/**
* BungeeCord Common Layout Class
*/
public abstract class BungeeCommon extends BungeeCord {
2021-06-15 06:09:51 +02:00
private static BungeeCommon instance;
final Supplier<BungeeAPI> api;
2020-11-14 04:41:56 +01:00
protected BungeeCommon(Supplier<BungeeAPI> api) throws IOException {
2020-11-14 04:41:56 +01:00
this.api = api;
2021-06-15 06:09:51 +02:00
instance = this;
2020-11-14 04:41:56 +01:00
}
/**
* Get the name from BungeeCord's original signature (for determining which fork is being used)
*
* @return BungeeCord Software Name
*/
public abstract String getBungeeName();
/**
* Waterfall's getServersCopy()
*
* @return Server Map Copy
*/
public abstract Map<String, ServerInfo> getServersCopy();
2021-06-15 06:09:51 +02:00
/**
* Gets the ProxyServer Common Object
*
* @return ProxyServer Common
*/
public static BungeeCommon getInstance() {
return instance;
}
2020-11-14 04:41:56 +01:00
}