Skip to content

Commit

Permalink
Fix null or empty has handling in LegacyResourcepackHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
R00tB33rMan committed May 26, 2024
1 parent 42d4288 commit 4a56689
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private void tickResourcePackQueue() {
break;
}
onResourcePackResponse(new ResourcePackResponseBundle(queued.getId(),
new String(queued.getHash()),
queued.getHash() == null ? "" : new String(queued.getHash()),
PlayerResourcePackStatusEvent.Status.DECLINED));
queued = null;
}
Expand Down Expand Up @@ -172,6 +172,10 @@ public boolean onResourcePackResponse(

@Override
public boolean hasPackAppliedByHash(final byte[] hash) {
if (hash == null) {
return false;
}

return this.appliedResourcePack != null
&& Arrays.equals(this.appliedResourcePack.getHash(), hash);
}
Expand Down

0 comments on commit 4a56689

Please sign in to comment.