33 lines
878 B
Java
33 lines
878 B
Java
package gq.unurled.raxen.utils;
|
|
|
|
import com.comphenix.protocol.PacketType;
|
|
import com.comphenix.protocol.ProtocolManager;
|
|
import com.comphenix.protocol.events.ListenerPriority;
|
|
import com.comphenix.protocol.events.PacketAdapter;
|
|
import gq.unurled.raxen.Raxen;
|
|
|
|
public class TabApi {
|
|
|
|
private ProtocolManager protocolManager;
|
|
private Raxen main;
|
|
|
|
/**
|
|
* instance of tabapi
|
|
* @param main running instance of main
|
|
*/
|
|
public TabApi(Raxen main) {
|
|
this.main = main;
|
|
this.protocolManager = main.getProtocolManager();
|
|
}
|
|
|
|
/**
|
|
* stuff for protocolmanager, used to add player and infos to the ping list
|
|
*/
|
|
public void packetListener() {
|
|
protocolManager.addPacketListener(
|
|
new PacketAdapter(main, ListenerPriority.NORMAL, PacketType.Play.Server.PLAYER_INFO) {
|
|
}
|
|
);
|
|
}
|
|
|
|
}
|