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

Overview

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

You might also like...

A market plugin to prevent mounting inflation in minecraft servers

A market plugin to prevent mounting inflation in minecraft servers

A market plugin to prevent mounting inflation in minecraft servers. The optimized power index function and the inverse function are used to converge the selling price. It could solve the problem of server economic imbalance caused by the high production capacity of certain items in industrial type servers. In Summary, The richer the player is, the less profit the player receive.

Dec 25, 2022

Brings marriage to Minecraft servers using commands.

MarriageLab MarriageLab is a plugin that brings marriage to Minecraft servers using commands. It has been tested on Spigot and Paper. Requeriments Thi

Oct 8, 2021

Lightweight reflection based tab library supporting 1.7 - 1.17 servers and clients.

Lightweight reflection based tab library supporting 1.7 - 1.17 servers and clients.

Aug 23, 2022

An addon to Meteor Client that adds various modules designed to lag and crash servers

Meteor Crash Addon An addon to Meteor Client that adds various modules designed to lag and crash servers. Usage Either build it yourself, or download

Dec 27, 2022

Polydex - a mod allowing you to see player-friendly information about blocks and items on servers

Polydex is a mod allowing you to see player-friendly information about blocks and items on servers. It designed for survival-like, vanilla client compatible servers using Polymer mods or PolyMC, through it can be used in modded or vanilla-content setting!

Dec 20, 2022

Plugin aimed at unifying inventory menus for Java Edition with Bedrock Edition forms, on servers running Geyser.

CrossplatForms A plugin aimed at providing fast, easy, and dynamic creation of Bedrock Edition forms through configurations. Also allows for creation

Jan 4, 2023

Forge mod for anarchy servers.

Solaros Forge mod for anarchy servers. (1.12.2) Q: What is this? A: This a forge mod I worked on a while back, I was interested in anarchy mod develop

Dec 2, 2022

A 1.12.2 forge injection based hacked client for anarchy servers

nebula another failed abortion of inferno and the aftermath of gavin at coding also is an anarchy utility client, i think thats important to point out

Dec 24, 2022

Lynx client is a utility mod for 1.12.2 anarchy servers.

Lynx-Client Lynx client is a utility mod for 1.12.2 anarchy servers. Usage Download and install forge 1.12.2 from the official forge website Put the j

Dec 21, 2022
Comments
  • Can't return the correct value

    Can't return the correct value

    MinecraftServerInformations » Building a new Pinger... MinecraftServerInformations » Pinging server mypkm.cn with port 25566... MinecraftServerInformations » Pinged successfully, calling callback ! 0/0 null

    opened by RedCarl 0
Releases(1.0.0)
Owner
Ex-Paladium Developper 📦
null
Minecraft mod which allows displaying your items to other players in chat.

Show Me What You Got Show Me What You Got is a Minecraft mod for Fabric. When added to the server, it allows players to display their items in chat by

null 5 Oct 24, 2022
A Java Project designed to manage a football clubs players and play RNG Simulated Games against other teams.

A Java Project designed to manage a football clubs players and play RNG Simulated Games against other teams.

ztrunks 0 Feb 21, 2022
A 1.7.10 Forge Mod to allow players to access easy stats like latency, FPS, and CPS

EZStats A 1.7.10 Forge Mod to allow players to access easy stats like latency, FPS, and CPS. Currently a work in progress, all code is accessable in t

applesfruit 4 Aug 8, 2022
Squaremap is a minimalistic and lightweight world map viewer for Minecraft servers, using the vanilla map rendering style

squaremap squaremap (formerly known as Pl3xMap) is a minimalistic and lightweight live world map viewer for Minecraft servers. What is squaremap If, l

Jason 204 Jan 3, 2023
Open-source forge mod which provides custom cosmetics for players.

OpenCosmetics Open-source forge mod which provides custom cosmetics for players. Building gradlew setupDecompWorkspace gradlew idea Testing gradlew ru

null 3 May 16, 2021
Add an event on Spigot API to listen to players kill a player with EnderCrystal

(Minecraft) Add an event on Spigot API to listen to players kill a player with EnderCrystal

Guang_Chen_ 4 Dec 22, 2022
Staff-Mode plugin for Minecraft servers.

DONUTSTAFF A Simple Staff Mode plugin for you Minecraft Server. This plugin goals to lightweight and fast. At the moment, is on a BETA phase, so pleas

null 10 Jan 28, 2022
A client-side Fabric mod for Minecraft Beta 1.7.3 that allows you to connect to servers running almost any patch from Alpha v1.1.2_01 to Beta 1.7.3.

multiversion-fabric A client-side Fabric mod for Minecraft Beta 1.7.3 that allows you to connect to servers running almost any patch from Alpha v1.1.2

0n1 2 Mar 13, 2022
Dynamic Daemon Node for instancing of Minecraft Servers.

DashDynamicDaemon DashDynamicDaemon: A Sharded Minecraft Server hosting system. Purpose This system was originally created to host automatically scala

BattleDash 4 Apr 25, 2022
Minecraft mod to block NameMC indexing on servers.

Fuck NameMC A mod to block server status ping from NameMC. ?? What's this mod? Let's say it outright, NameMC doesn't have any decency. It indexes ever

LambdAurora 72 Dec 28, 2022