Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
Do not process packet if receiver is null
Browse files Browse the repository at this point in the history
This should resolve #2.
  • Loading branch information
Krymonota committed Apr 8, 2020
1 parent e483650 commit b528990
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ public void onEnable() {

@Override
public Object onPacketOutAsync(Player receiver, Channel channel, Object packet) {
if (!packetPlayOutChatClass.isInstance(packet)) {
if (!packetPlayOutChatClass.isInstance(packet) || receiver == null) {
return super.onPacketOutAsync(receiver, channel, packet);
}

Optional<String> text = Optional.empty();
final BaseComponent[] components = componentsField.get(packet);
final List<BaseComponent> processedComponentList = new ArrayList<BaseComponent>();
Expand Down

0 comments on commit b528990

Please sign in to comment.