From 868c5ba044e14c9edb6fe4f43db7b592d381825a Mon Sep 17 00:00:00 2001 From: Matt Worzala Date: Mon, 30 Aug 2021 18:04:46 -0400 Subject: [PATCH] add array copy --- src/main/java/net/minestom/server/item/metadata/BundleMeta.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/minestom/server/item/metadata/BundleMeta.java b/src/main/java/net/minestom/server/item/metadata/BundleMeta.java index 1ca219a75..387ef2b66 100644 --- a/src/main/java/net/minestom/server/item/metadata/BundleMeta.java +++ b/src/main/java/net/minestom/server/item/metadata/BundleMeta.java @@ -33,7 +33,7 @@ public class BundleMeta extends ItemMeta implements ItemMetaBuilder.Provider items = new ArrayList<>(); public Builder items(@NotNull List items) { - this.items = items; + this.items = new ArrayList<>(items); // defensive copy updateItems(); return this; }