Check for empty when sending equipment changes (#12008)

This commit is contained in:
Creeam
2025-01-25 11:04:47 -08:00
committed by GitHub
parent 88bbead13b
commit 336ea9dfeb
2 changed files with 2 additions and 1 deletions

View File

@@ -1161,6 +1161,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void sendEquipmentChange(LivingEntity entity, Map<EquipmentSlot, ItemStack> items) {
Preconditions.checkArgument(entity != null, "Entity cannot be null");
Preconditions.checkArgument(items != null, "items cannot be null");
Preconditions.checkArgument(!items.isEmpty(), "items cannot be empty");
if (this.getHandle().connection == null) {
return;