mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-30 21:17:53 +01:00
add array copy
This commit is contained in:
parent
5b8051e2e8
commit
868c5ba044
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user