SHARE
TWEET

Untitled




Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(this, PacketType.Play.Server.PLAYER_INFO) {
- @Override
- public void onPacketSending(PacketEvent e){
- PacketContainer pc = e.getPacket();
- List<PlayerInfoData> l = new ArrayList<PlayerInfoData>();
- pc.getPlayerInfoDataLists().read(0).forEach(pd -> {
- if(pd.getLatency() > 1){
- l.add(new PlayerInfoData(pd.getProfile(), 1, pd.getGameMode(), pd.getDisplayName()));
- } else {
- l.add(pd);
- }
- });
- pc.getPlayerInfoDataLists().write(0, l);
- e.setPacket(pc);
- }
- });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.