Update to Minecraft 1.11

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2016-11-17 12:40:59 +11:00
parent 06e0085b98
commit f1fb3d9462
59 changed files with 646 additions and 682 deletions

View File

@@ -1,26 +0,0 @@
package org.bukkit.util;
import java.lang.reflect.Array;
/**
* @deprecated Bukkit targets Java 1.6. This class will be removed in a
* subsequent release.
*/
@Deprecated
public class Java15Compat {
@SuppressWarnings("unchecked")
public static <T> T[] Arrays_copyOfRange(T[] original, int start, int end) {
if (original.length >= start && 0 <= start) {
if (start <= end) {
int length = end - start;
int copyLength = Math.min(length, original.length - start);
T[] copy = (T[]) Array.newInstance(original.getClass().getComponentType(), length);
System.arraycopy(original, start, copy, 0, copyLength);
return copy;
}
throw new IllegalArgumentException();
}
throw new ArrayIndexOutOfBoundsException();
}
}