From bc1e4351f9a648cd178d245426ae64fc86f75c6d Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Wed, 9 Mar 2016 23:29:06 +0100 Subject: [PATCH] I am inclusive <3 --- src/com/massivecraft/massivecore/adapter/InventoryAdapter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/massivecraft/massivecore/adapter/InventoryAdapter.java b/src/com/massivecraft/massivecore/adapter/InventoryAdapter.java index ea3cb9dc..8586a668 100644 --- a/src/com/massivecraft/massivecore/adapter/InventoryAdapter.java +++ b/src/com/massivecraft/massivecore/adapter/InventoryAdapter.java @@ -255,11 +255,12 @@ public class InventoryAdapter implements JsonDeserializer, JsonSerial // -------------------------------------------- // // This is a modified copyOfRange implementation. + // Both boundaries are inclusive. // It returns the original when possible. public static T[] range(T[] original, int from, int to) { if (from == 0 && to == original.length - 1) return original; - return Arrays.copyOfRange(original, from, to); + return Arrays.copyOfRange(original, from, to + 1); } }