Check for empty when sending equipment changes (#12008)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user