mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2025-01-18 21:01:30 +01:00
Re-setup the packet handlers
This commit is contained in:
parent
ccd1c147d2
commit
421702797a
@ -24,6 +24,7 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -36,7 +37,9 @@ public class PacketsHandler {
|
||||
registerPacketHandlers();
|
||||
}
|
||||
|
||||
private void registerPacketHandlers() {
|
||||
public void registerPacketHandlers() {
|
||||
Arrays.fill(packetHandlers, null);
|
||||
|
||||
List<IPacketHandler> packetHandlers = new ArrayList<>();
|
||||
|
||||
packetHandlers.add(new PacketHandlerAttributes());
|
||||
|
@ -136,6 +136,8 @@ public class PacketsManager {
|
||||
PacketEvents.getAPI().getEventManager().unregisterListener(mainListener);
|
||||
}
|
||||
|
||||
getPacketsHandler().registerPacketHandlers();
|
||||
|
||||
ArrayList<Server> packetsToListen = new ArrayList<>();
|
||||
|
||||
// Add spawn packets
|
||||
|
Loading…
Reference in New Issue
Block a user