mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-01-23 00:31:20 +01:00
Fixed PacketChat NPE
This commit is contained in:
parent
b223c9cebc
commit
07ceeb4fdb
@ -16,6 +16,8 @@ public class PacketChat extends AbstractPacketAdapter {
|
||||
public void onSend(PacketContainer packet) {
|
||||
for(int i = 0; i < packet.getChatComponents().size(); i++) {
|
||||
WrappedChatComponent component = packet.getChatComponents().read(i);
|
||||
if(component == null || component.getHandle() == null)
|
||||
continue;
|
||||
WrappedChatComponent newComponent = WrappedChatComponent.fromHandle(ChatComponent.modifyComponent(component.getHandle()));
|
||||
packet.getChatComponents().write(i, newComponent);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user