How to use this API
add to your OnEnable()
@Override
public void onEnable() {
MOTDAPI.registerListener(this);
}
Implement all the Plugin Wants, from com.designlyi.motdapi
now you should have a new Method in your Main class wich Looks like this one.
@Override
public void onPing(PingEvent e) {
}
Now you can add this example to look if Everithing is working.
I Hope my API did Help you.
Maybe Leave a Rating <3
@Override
public void onPing(PingEvent e) {
PingReply reply = e.getReply();
reply.setMaxPlayers(new Random().nextInt(999));
reply.setOnlinePlayers(new Random().nextInt(999));
reply.setMOTD("Line 1" + "\n" + "Line 2);
List<String> sample = new LinkedList<String>();
sample.add("§4MaintenanceMode!");
reply.setPlayerSample(sample);
reply.setProtocolName("§4Maintenance!");
reply.setProtocolVersion(2);
}
If you Liked this API maybe you want to support me :)
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta