Don't register team listener if using armorstands

This commit is contained in:
libraryaddict 2020-08-23 13:28:35 +12:00
parent e22ba6565f
commit 3591c3bcf8

View File

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