Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ProtocolManager prm = ProtocolLibrary.getProtocolManager();
- prm.addPacketListener(new PacketAdapter(UhcCore.getPlugin(), PacketType.Status.Server.OUT_SERVER_INFO) {
- @Override
- public void onPacketSending(PacketEvent event) {
- WrappedServerPing ping = event.getPacket().getServerPings().read(0);
- ping.setPlayers(GameManager.getGameManager().getMessages().getHoverMSG());
- if (getGameState().equals(GameState.LOADING)) {
- ping.setVersionProtocol(5);
- ping.setVersionName("ยง4Server Loading World ("+mapLoader.getPercentageState()+"%)");
- ping.setMotD("MOD server cargando nose :v");
- } else if (Bukkit.hasWhitelist()) {
- ping.setVersionProtocol(5);
- ping.setVersionName("ยง4WHITELIST ON");
- ping.setMotD("MOTD server cargando");
- } else {
- ping.setMotD("MOD normal del server (cuando hay wl off pero sera global)");
- return;
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement