SkillAgentSearch skills...

MinecraftServerInformations

A library that provide informations for minecraft servers (players, maxplayers and motd)

Install / Use

/learn @WelsyMC/MinecraftServerInformations
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

MinecraftServerInformations

Maintenance Maintaner GitHub version

MinecraftServerInformation is a java library for retrieving informations about Minecraft Servers.

Installation

  1. Download the latest version from the Releases tab
  2. Add the .jar to your project libraries

Usage

class Test{
    void retrievePaladiumInfos(){
        AServer server = MinecraftServerInformations.INSTANCE.getBuilder()
                .host("proxy.paladium-pvp.fr")
                .port(25565)
                .onPingSuccess(this::serverPinged)
                .build();
        /*
         * Threading.THREADING = Use a separated thread (asynchronously call the onPingSuccess method)
         * Threading.NO_THREADING = Don't use a separated thread (the current thread will wait for the ping to finish)
         */
        server.ping(Threading.THREADING);
    }
    
    public void serverPinged(ServerInformations infos){
        int players = infos.getPlayers();
        int maxPlayers = infos.getMaxPlayers();
        String motd = infos.getMotd();
        // do whatever you want
    }
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

View on GitHub
GitHub Stars11
CategoryDevelopment
Updated2y ago
Forks0

Languages

Java

Security Score

75/100

Audited on Jul 31, 2023

No findings