mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-24 11:36:51 +01:00
Update unit tests to CraftBukkit 1.6.2
This commit is contained in:
parent
6fe7fe46f3
commit
a4eb219a9a
@ -11,12 +11,12 @@
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<name>net.sourceforge.metrics.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>net.sourceforge.metrics.builder</name>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
|
@ -214,7 +214,7 @@
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>craftbukkit</artifactId>
|
||||
<version>1.5.1-R0.2-SNAPSHOT</version>
|
||||
<version>1.6.2-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -219,6 +219,11 @@ public class MinecraftReflection {
|
||||
MINECRAFT_FULL_PACKAGE = minecraftPackage;
|
||||
CRAFTBUKKIT_PACKAGE = craftBukkitPackage;
|
||||
|
||||
// Make sure it exists
|
||||
if (getMinecraftServerClass() == null) {
|
||||
throw new IllegalArgumentException("Cannot find MinecraftServer for package " + minecraftPackage);
|
||||
}
|
||||
|
||||
// Standard matcher
|
||||
setDynamicPackageMatcher(MINECRAFT_OBJECT);
|
||||
}
|
||||
|
@ -4,10 +4,10 @@ import static org.mockito.Matchers.any;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import net.minecraft.server.v1_5_R2.StatisticList;
|
||||
import net.minecraft.server.v1_6_R2.StatisticList;
|
||||
|
||||
// Will have to be updated for every version though
|
||||
import org.bukkit.craftbukkit.v1_5_R2.inventory.CraftItemFactory;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftItemFactory;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
@ -63,6 +63,6 @@ public class BukkitInitialization {
|
||||
*/
|
||||
public static void initializePackage() {
|
||||
// Initialize reflection
|
||||
MinecraftReflection.setMinecraftPackage("net.minecraft.server.v1_5_R2", "org.bukkit.craftbukkit.v1_5_R2");
|
||||
MinecraftReflection.setMinecraftPackage("net.minecraft.server.v1_6_R2", "org.bukkit.craftbukkit.v1_6_R2");
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import java.lang.reflect.Array;
|
||||
import java.util.List;
|
||||
|
||||
// Will have to be updated for every version though
|
||||
import org.bukkit.craftbukkit.v1_5_R2.inventory.CraftItemFactory;
|
||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftItemFactory;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.WorldType;
|
||||
|
Loading…
Reference in New Issue
Block a user