geforkt von Mirrors/Velocity
Fix null
or empty has handling in LegacyResourcepackHandler
(#1331)
Dieser Commit ist enthalten in:
Ursprung
42d4288334
Commit
1c36b66dcb
@ -109,7 +109,7 @@ public sealed class LegacyResourcePackHandler extends ResourcePackHandler
|
||||
break;
|
||||
}
|
||||
onResourcePackResponse(new ResourcePackResponseBundle(queued.getId(),
|
||||
new String(queued.getHash()),
|
||||
queued.getHash() == null ? "" : new String(queued.getHash()),
|
||||
PlayerResourcePackStatusEvent.Status.DECLINED));
|
||||
queued = null;
|
||||
}
|
||||
@ -172,6 +172,10 @@ public sealed class LegacyResourcePackHandler extends ResourcePackHandler
|
||||
|
||||
@Override
|
||||
public boolean hasPackAppliedByHash(final byte[] hash) {
|
||||
if (hash == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return this.appliedResourcePack != null
|
||||
&& Arrays.equals(this.appliedResourcePack.getHash(), hash);
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren