add array copy

This commit is contained in:
Matt Worzala 2021-08-30 18:04:46 -04:00
parent 5b8051e2e8
commit 868c5ba044
No known key found for this signature in database
GPG Key ID: 439DBBE092854841

View File

@ -33,7 +33,7 @@ public class BundleMeta extends ItemMeta implements ItemMetaBuilder.Provider<Bun
private List<ItemStack> items = new ArrayList<>();
public Builder items(@NotNull List<ItemStack> items) {
this.items = items;
this.items = new ArrayList<>(items); // defensive copy
updateItems();
return this;
}