Change async team

This commit is contained in:
libraryaddict 2021-01-24 22:30:36 +13:00
parent 0d558d79be
commit b63c9d20d5
2 changed files with 4 additions and 2 deletions

View File

@ -173,7 +173,8 @@ public class PacketsManager {
if (NmsVersion.v1_13.isSupported() &&
DisguiseConfig.getPlayerNameType() != DisguiseConfig.PlayerNameType.ARMORSTANDS) {
scoreboardTeamListener = new PacketListenerScoreboardTeam();
ProtocolLibrary.getProtocolManager().getAsynchronousManager().registerAsyncHandler(scoreboardTeamListener);
ProtocolLibrary.getProtocolManager().addPacketListener(scoreboardTeamListener);
}
}
}

View File

@ -1,6 +1,7 @@
package me.libraryaddict.disguise.utilities.packets.packetlisteners;
import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.events.ListenerOptions;
import com.comphenix.protocol.events.PacketAdapter;
import com.comphenix.protocol.events.PacketContainer;
import com.comphenix.protocol.events.PacketEvent;
@ -21,7 +22,7 @@ import java.util.Set;
*/
public class PacketListenerScoreboardTeam extends PacketAdapter {
public PacketListenerScoreboardTeam() {
super(LibsDisguises.getInstance(), PacketType.Play.Server.SCOREBOARD_TEAM);
super(new AdapterParameteters().optionAsync().plugin(LibsDisguises.getInstance()).types(PacketType.Play.Server.SCOREBOARD_TEAM));
}
@Override