Advertisement
CubyGC

Untitled

Mar 28th, 2020
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. ProtocolManager prm = ProtocolLibrary.getProtocolManager();
  2. prm.addPacketListener(new PacketAdapter(UhcCore.getPlugin(), PacketType.Status.Server.OUT_SERVER_INFO) {
  3. @Override
  4. public void onPacketSending(PacketEvent event) {
  5. WrappedServerPing ping = event.getPacket().getServerPings().read(0);
  6. ping.setPlayers(GameManager.getGameManager().getMessages().getHoverMSG());
  7. if (getGameState().equals(GameState.LOADING)) {
  8. ping.setVersionProtocol(5);
  9. ping.setVersionName("ยง4Server Loading World ("+mapLoader.getPercentageState()+"%)");
  10. ping.setMotD("MOD server cargando nose :v");
  11. } else if (Bukkit.hasWhitelist()) {
  12. ping.setVersionProtocol(5);
  13. ping.setVersionName("ยง4WHITELIST ON");
  14. ping.setMotD("MOTD server cargando");
  15. } else {
  16. ping.setMotD("MOD normal del server (cuando hay wl off pero sera global)");
  17. return;
  18. }
  19. }
  20. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement