mirror of
https://github.com/Minestom/Minestom.git
synced 2025-03-02 11:21:15 +01:00
Replaced Arrays.copyOf to native #clone
This commit is contained in:
parent
6ecf53c863
commit
0e6bb6cc3d
@ -23,7 +23,6 @@ import net.minestom.server.utils.validate.Check;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@ -199,7 +198,7 @@ public class Inventory implements InventoryModifier, InventoryClickHandler, View
|
||||
@NotNull
|
||||
@Override
|
||||
public ItemStack[] getItemStacks() {
|
||||
return Arrays.copyOf(itemStacks, itemStacks.length);
|
||||
return itemStacks.clone();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -22,7 +22,6 @@ import net.minestom.server.utils.validate.Check;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
@ -59,7 +58,7 @@ public class PlayerInventory implements InventoryModifier, InventoryClickHandler
|
||||
@NotNull
|
||||
@Override
|
||||
public ItemStack[] getItemStacks() {
|
||||
return Arrays.copyOf(items, items.length);
|
||||
return items.clone();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
Loading…
Reference in New Issue
Block a user