Updated the addViewer method to verify if a player is already in the viewers list before adding. Adjusted the order of operations to ensure the scoreboard is updated correctly before adding the player to the viewers.
Updated the destroyPacket to utilize getIntLists(). This change ensures proper handling of entity IDs in line with the necessary method for destroying entities.
Changed the method from getIntegerArrays() to getIntegers() to ensure the correct destruction packet is sent. This fixes an issue where entities were not being correctly destroyed, thereby preventing potential memory leaks and display errors.