From 2b55e129b33b453449ecd61a715afe5aa3ec2c88 Mon Sep 17 00:00:00 2001 From: William Date: Sat, 23 Sep 2023 15:15:10 +0100 Subject: [PATCH] Slightly improve `BukkitData.Items#setContents` method --- .../main/java/net/william278/husksync/data/BukkitData.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/bukkit/src/main/java/net/william278/husksync/data/BukkitData.java b/bukkit/src/main/java/net/william278/husksync/data/BukkitData.java index 7d93c9bd..051a3bee 100644 --- a/bukkit/src/main/java/net/william278/husksync/data/BukkitData.java +++ b/bukkit/src/main/java/net/william278/husksync/data/BukkitData.java @@ -95,14 +95,9 @@ public abstract class BukkitData implements Data { @Override public void setContents(@NotNull Data.Items contents) { - System.arraycopy( - ((BukkitData.Items) contents).getContents(), - 0, this.contents, - 0, this.contents.length - ); + this.setContents(((BukkitData.Items) contents).getContents()); } - @SuppressWarnings("unused") public void setContents(@NotNull ItemStack[] contents) { System.arraycopy(contents, 0, this.contents, 0, this.contents.length); }