Main class should extend one of these classes respectively.
FernBungeeAPI
FernSpongeAPI
FernSpigotAPI
FernVelocityAPI
[Bungee/Spigot Required] This is required in order for the api to work in spigot and/or bunge
public void onEnable() {
super.onEnable();
}
For sponge, you should have
@Listener
public void onServerStart(GameStartedServerEvent event) {
super.onServerStart(event);
}
For Velocity
public FernVelocityAPI(ProxyServer server, Logger logger) {
super(server, logger);
}
@Subscribe
public void onProxyInitialization(ProxyInitializeEvent event) {
super.onProxyInitialization(event);
// Do some operation demanding access to the Velocity API here.
// For instance, we could register an event:
}
To get a fplayer instance, run
// Can only convert ProxiedPlayer, org.bukkit.entity.Player and/or EntityPlayer
IFPlayer fPlayer = Universal.convertPlayerObjectToFPlayer(player);