builder()
- .put(MinecraftVersion.WORLD_UPDATE, 4)
- .put(MinecraftVersion.SKIN_UPDATE, 5)
- .put(MinecraftVersion.BOUNTIFUL_UPDATE, 47)
- .build();
- private static MinecraftVersion LAST_VERSION = MinecraftVersion.BOUNTIFUL_UPDATE;
-
private static Class> GAME_PROFILE = MinecraftReflection.getGameProfileClass();
private static Class> GAME_PROFILE_ARRAY = MinecraftReflection.getArrayClass(GAME_PROFILE);
@@ -101,7 +89,7 @@ public class WrappedServerPing extends AbstractWrapper {
/**
* Construct a new server ping initialized with a zero player count, and zero maximum.
*
- * Note that the version string is set to 1.8.
+ * Note that the version string is set to 1.9.4.
*/
public WrappedServerPing() {
super(MinecraftReflection.getServerPingClass());
@@ -129,14 +117,8 @@ public class WrappedServerPing extends AbstractWrapper {
* Reset the version string to the default state.
*/
protected void resetVersion() {
- ProtocolManager manager = ProtocolLibrary.getProtocolManager();
- MinecraftVersion minecraftVersion = LAST_VERSION;
-
- // Fetch the latest known version
- if (manager != null) {
- minecraftVersion = manager.getMinecraftVersion();
- }
- version = VERSION_CONSTRUCTOR.invoke(minecraftVersion.toString(), VERSION_NUMBERS.get(minecraftVersion));
+ MinecraftVersion minecraftVersion = MinecraftVersion.getCurrentVersion();
+ version = VERSION_CONSTRUCTOR.invoke(minecraftVersion.toString(), MinecraftProtocolVersion.getCurrentVersion());
VERSION.set(handle, version);
}
diff --git a/modules/ProtocolLib/pom.xml b/modules/ProtocolLib/pom.xml
index ac058fe4..2e63687b 100644
--- a/modules/ProtocolLib/pom.xml
+++ b/modules/ProtocolLib/pom.xml
@@ -234,13 +234,13 @@
org.spigotmc
spigot-api
- 1.9.4-R0.1-SNAPSHOT
+ 1.10-R0.1-SNAPSHOT
provided
org.spigotmc
spigot
- 1.9.4-R0.1-SNAPSHOT
+ 1.10-R0.1-SNAPSHOT
provided
diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/BukkitInitialization.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/BukkitInitialization.java
index e69d7a1b..3ccc9ac7 100644
--- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/BukkitInitialization.java
+++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/BukkitInitialization.java
@@ -5,18 +5,18 @@ import static org.mockito.Mockito.when;
import java.util.logging.Logger;
-import net.minecraft.server.v1_9_R2.DispenserRegistry;
-
import org.bukkit.Bukkit;
import org.bukkit.Server;
-import org.bukkit.craftbukkit.v1_9_R2.CraftServer;
-import org.bukkit.craftbukkit.v1_9_R2.inventory.CraftItemFactory;
-import org.bukkit.craftbukkit.v1_9_R2.util.Versioning;
+import org.bukkit.craftbukkit.v1_10_R1.CraftServer;
+import org.bukkit.craftbukkit.v1_10_R1.inventory.CraftItemFactory;
+import org.bukkit.craftbukkit.v1_10_R1.util.Versioning;
import com.comphenix.protocol.utility.Constants;
import com.comphenix.protocol.utility.MinecraftReflection;
import com.comphenix.protocol.utility.MinecraftVersion;
+import net.minecraft.server.v1_10_R1.DispenserRegistry;
+
/**
* Used to ensure that ProtocolLib and Bukkit is prepared to be tested.
*
diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/PacketTypeTest.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/PacketTypeTest.java
index d70a4c0d..bb947c3a 100644
--- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/PacketTypeTest.java
+++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/PacketTypeTest.java
@@ -14,7 +14,7 @@ import com.comphenix.protocol.PacketType.Sender;
import com.comphenix.protocol.injector.netty.NettyProtocolRegistry;
import com.comphenix.protocol.injector.netty.ProtocolRegistry;
-import net.minecraft.server.v1_9_R2.PacketLoginInStart;
+import net.minecraft.server.v1_10_R1.PacketLoginInStart;
public class PacketTypeTest {
diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java
index abc964be..075ba5d9 100644
--- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java
+++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/events/PacketContainerTest.java
@@ -28,16 +28,6 @@ import java.util.List;
import java.util.Objects;
import java.util.UUID;
-import net.minecraft.server.v1_9_R2.AttributeModifier;
-import net.minecraft.server.v1_9_R2.DataWatcher;
-import net.minecraft.server.v1_9_R2.Entity;
-import net.minecraft.server.v1_9_R2.EntityLightning;
-import net.minecraft.server.v1_9_R2.MobEffect;
-import net.minecraft.server.v1_9_R2.MobEffectList;
-import net.minecraft.server.v1_9_R2.PacketPlayOutBoss;
-import net.minecraft.server.v1_9_R2.PacketPlayOutUpdateAttributes;
-import net.minecraft.server.v1_9_R2.PacketPlayOutUpdateAttributes.AttributeSnapshot;
-
import org.apache.commons.lang.SerializationUtils;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.bukkit.ChatColor;
@@ -76,6 +66,16 @@ import com.comphenix.protocol.wrappers.nbt.NbtCompound;
import com.comphenix.protocol.wrappers.nbt.NbtFactory;
import com.google.common.collect.Lists;
+import net.minecraft.server.v1_10_R1.AttributeModifier;
+import net.minecraft.server.v1_10_R1.DataWatcher;
+import net.minecraft.server.v1_10_R1.Entity;
+import net.minecraft.server.v1_10_R1.EntityLightning;
+import net.minecraft.server.v1_10_R1.MobEffect;
+import net.minecraft.server.v1_10_R1.MobEffectList;
+import net.minecraft.server.v1_10_R1.PacketPlayOutBoss;
+import net.minecraft.server.v1_10_R1.PacketPlayOutUpdateAttributes;
+import net.minecraft.server.v1_10_R1.PacketPlayOutUpdateAttributes.AttributeSnapshot;
+
// Ensure that the CraftItemFactory is mockable
@RunWith(org.powermock.modules.junit4.PowerMockRunner.class)
@PowerMockIgnore({ "org.apache.log4j.*", "org.apache.logging.*", "org.bukkit.craftbukkit.libs.jline.*" })
diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/utility/MinecraftReflectionTest.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/utility/MinecraftReflectionTest.java
index c739c018..cf2236d5 100644
--- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/utility/MinecraftReflectionTest.java
+++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/utility/MinecraftReflectionTest.java
@@ -18,18 +18,18 @@ import org.powermock.core.classloader.annotations.PowerMockIgnore;
import com.comphenix.protocol.BukkitInitialization;
import com.mojang.authlib.GameProfile;
-import net.minecraft.server.v1_9_R2.ChatComponentText;
-import net.minecraft.server.v1_9_R2.ChunkCoordIntPair;
-import net.minecraft.server.v1_9_R2.DataWatcher;
-import net.minecraft.server.v1_9_R2.IBlockData;
-import net.minecraft.server.v1_9_R2.IChatBaseComponent;
-import net.minecraft.server.v1_9_R2.IChatBaseComponent.ChatSerializer;
-import net.minecraft.server.v1_9_R2.NBTCompressedStreamTools;
-import net.minecraft.server.v1_9_R2.PacketPlayOutUpdateAttributes.AttributeSnapshot;
-import net.minecraft.server.v1_9_R2.PlayerConnection;
-import net.minecraft.server.v1_9_R2.ServerPing;
-import net.minecraft.server.v1_9_R2.ServerPing.ServerData;
-import net.minecraft.server.v1_9_R2.ServerPing.ServerPingPlayerSample;
+import net.minecraft.server.v1_10_R1.ChatComponentText;
+import net.minecraft.server.v1_10_R1.ChunkCoordIntPair;
+import net.minecraft.server.v1_10_R1.DataWatcher;
+import net.minecraft.server.v1_10_R1.IBlockData;
+import net.minecraft.server.v1_10_R1.IChatBaseComponent;
+import net.minecraft.server.v1_10_R1.IChatBaseComponent.ChatSerializer;
+import net.minecraft.server.v1_10_R1.NBTCompressedStreamTools;
+import net.minecraft.server.v1_10_R1.PacketPlayOutUpdateAttributes.AttributeSnapshot;
+import net.minecraft.server.v1_10_R1.PlayerConnection;
+import net.minecraft.server.v1_10_R1.ServerPing;
+import net.minecraft.server.v1_10_R1.ServerPing.ServerData;
+import net.minecraft.server.v1_10_R1.ServerPing.ServerPingPlayerSample;
@RunWith(org.powermock.modules.junit4.PowerMockRunner.class)
@PowerMockIgnore({ "org.apache.log4j.*", "org.apache.logging.*", "org.bukkit.craftbukkit.libs.jline.*" })
diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/utility/StreamSerializerTest.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/utility/StreamSerializerTest.java
index a746b48e..22f55134 100644
--- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/utility/StreamSerializerTest.java
+++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/utility/StreamSerializerTest.java
@@ -8,8 +8,6 @@ import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
-import net.minecraft.server.v1_9_R2.IntHashMap;
-
import org.bukkit.ChatColor;
import org.bukkit.DyeColor;
import org.bukkit.Material;
@@ -24,6 +22,8 @@ import com.comphenix.protocol.BukkitInitialization;
import com.comphenix.protocol.wrappers.nbt.NbtCompound;
import com.comphenix.protocol.wrappers.nbt.NbtFactory;
+import net.minecraft.server.v1_10_R1.IntHashMap;
+
@RunWith(org.powermock.modules.junit4.PowerMockRunner.class)
@PowerMockIgnore({ "org.apache.log4j.*", "org.apache.logging.*", "org.bukkit.craftbukkit.libs.jline.*" })
//@PrepareForTest(CraftItemFactory.class)
diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/ChunkCoordIntPairTest.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/ChunkCoordIntPairTest.java
index c9d759bb..60f245a2 100644
--- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/ChunkCoordIntPairTest.java
+++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/ChunkCoordIntPairTest.java
@@ -16,15 +16,15 @@ public class ChunkCoordIntPairTest {
@Test
public void test() {
- net.minecraft.server.v1_9_R2.ChunkCoordIntPair pair = new net.minecraft.server.v1_9_R2.ChunkCoordIntPair(1, 2);
+ net.minecraft.server.v1_10_R1.ChunkCoordIntPair pair = new net.minecraft.server.v1_10_R1.ChunkCoordIntPair(1, 2);
ChunkCoordIntPair specific = ChunkCoordIntPair.getConverter().getSpecific(pair);
assertEquals(1, specific.getChunkX());
assertEquals(2, specific.getChunkZ());
- net.minecraft.server.v1_9_R2.ChunkCoordIntPair roundtrip =
- (net.minecraft.server.v1_9_R2.ChunkCoordIntPair) ChunkCoordIntPair.getConverter().
- getGeneric(net.minecraft.server.v1_9_R2.ChunkCoordIntPair.class, specific);
+ net.minecraft.server.v1_10_R1.ChunkCoordIntPair roundtrip =
+ (net.minecraft.server.v1_10_R1.ChunkCoordIntPair) ChunkCoordIntPair.getConverter().
+ getGeneric(net.minecraft.server.v1_10_R1.ChunkCoordIntPair.class, specific);
assertEquals(1, roundtrip.x);
assertEquals(2, roundtrip.z);
diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/EnumWrappersTest.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/EnumWrappersTest.java
index ea6f5fac..adb9d409 100644
--- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/EnumWrappersTest.java
+++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/EnumWrappersTest.java
@@ -1,12 +1,6 @@
package com.comphenix.protocol.wrappers;
import static org.junit.Assert.assertEquals;
-import net.minecraft.server.v1_9_R2.EntityHuman.EnumChatVisibility;
-import net.minecraft.server.v1_9_R2.EnumDifficulty;
-import net.minecraft.server.v1_9_R2.EnumProtocol;
-import net.minecraft.server.v1_9_R2.PacketPlayInClientCommand.EnumClientCommand;
-import net.minecraft.server.v1_9_R2.PacketPlayInUseEntity.EnumEntityUseAction;
-import net.minecraft.server.v1_9_R2.WorldSettings.EnumGamemode;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -16,6 +10,13 @@ import com.comphenix.protocol.reflect.EquivalentConverter;
import com.comphenix.protocol.reflect.accessors.Accessors;
import com.comphenix.protocol.reflect.accessors.FieldAccessor;
+import net.minecraft.server.v1_10_R1.EntityHuman.EnumChatVisibility;
+import net.minecraft.server.v1_10_R1.EnumDifficulty;
+import net.minecraft.server.v1_10_R1.EnumGamemode;
+import net.minecraft.server.v1_10_R1.EnumProtocol;
+import net.minecraft.server.v1_10_R1.PacketPlayInClientCommand.EnumClientCommand;
+import net.minecraft.server.v1_10_R1.PacketPlayInUseEntity.EnumEntityUseAction;
+
public class EnumWrappersTest {
private static class EnumClass {
public EnumProtocol protocol;
diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/WrappedAttributeTest.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/WrappedAttributeTest.java
index a193ce75..9d1f1a8c 100644
--- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/WrappedAttributeTest.java
+++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/WrappedAttributeTest.java
@@ -6,10 +6,6 @@ import static org.junit.Assert.assertTrue;
import java.util.List;
-import net.minecraft.server.v1_9_R2.AttributeModifier;
-import net.minecraft.server.v1_9_R2.PacketPlayOutUpdateAttributes;
-import net.minecraft.server.v1_9_R2.PacketPlayOutUpdateAttributes.AttributeSnapshot;
-
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -20,6 +16,10 @@ import com.comphenix.protocol.events.PacketContainer;
import com.comphenix.protocol.wrappers.WrappedAttributeModifier.Operation;
import com.google.common.collect.Lists;
+import net.minecraft.server.v1_10_R1.AttributeModifier;
+import net.minecraft.server.v1_10_R1.PacketPlayOutUpdateAttributes;
+import net.minecraft.server.v1_10_R1.PacketPlayOutUpdateAttributes.AttributeSnapshot;
+
public class WrappedAttributeTest {
private WrappedAttributeModifier doubleModifier;
private WrappedAttributeModifier constantModifier;
diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/WrappedDataWatcherTest.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/WrappedDataWatcherTest.java
index 0ba729d1..f56d53ff 100644
--- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/WrappedDataWatcherTest.java
+++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/WrappedDataWatcherTest.java
@@ -24,10 +24,7 @@ import static org.junit.Assert.assertTrue;
import java.util.UUID;
-import net.minecraft.server.v1_9_R2.EntityLightning;
-import net.minecraft.server.v1_9_R2.ItemStack;
-
-import org.bukkit.craftbukkit.v1_9_R2.entity.CraftLightningStrike;
+import org.bukkit.craftbukkit.v1_10_R1.entity.CraftLightningStrike;
import org.bukkit.entity.Entity;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -37,6 +34,9 @@ import com.comphenix.protocol.wrappers.WrappedDataWatcher.Registry;
import com.comphenix.protocol.wrappers.WrappedDataWatcher.Serializer;
import com.comphenix.protocol.wrappers.WrappedDataWatcher.WrappedDataWatcherObject;
+import net.minecraft.server.v1_10_R1.EntityLightning;
+import net.minecraft.server.v1_10_R1.ItemStack;
+
/**
* @author dmulloy2
*/
@@ -92,8 +92,8 @@ public class WrappedDataWatcherTest {
@Test
public void testSerializers() {
- Serializer blockPos = Registry.get(net.minecraft.server.v1_9_R2.BlockPosition.class, false);
- Serializer optionalBlockPos = Registry.get(net.minecraft.server.v1_9_R2.BlockPosition.class, true);
+ Serializer blockPos = Registry.get(net.minecraft.server.v1_10_R1.BlockPosition.class, false);
+ Serializer optionalBlockPos = Registry.get(net.minecraft.server.v1_10_R1.BlockPosition.class, true);
assertNotSame(blockPos, optionalBlockPos);
assertNull(Registry.get(ItemStack.class, false));
diff --git a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/NbtFactoryTest.java b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/NbtFactoryTest.java
index a4ba8019..8de3840d 100644
--- a/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/NbtFactoryTest.java
+++ b/modules/ProtocolLib/src/test/java/com/comphenix/protocol/wrappers/nbt/NbtFactoryTest.java
@@ -26,9 +26,6 @@ import java.io.DataInputStream;
import java.io.DataOutput;
import java.io.DataOutputStream;
-import net.minecraft.server.v1_9_R2.ItemStack;
-import net.minecraft.server.v1_9_R2.Items;
-
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -38,6 +35,9 @@ import com.comphenix.protocol.BukkitInitialization;
import com.comphenix.protocol.utility.MinecraftReflection;
import com.comphenix.protocol.wrappers.nbt.io.NbtBinarySerializer;
+import net.minecraft.server.v1_10_R1.ItemStack;
+import net.minecraft.server.v1_10_R1.Items;
+
@RunWith(org.powermock.modules.junit4.PowerMockRunner.class)
@PowerMockIgnore({ "org.apache.log4j.*", "org.apache.logging.*", "org.bukkit.craftbukkit.libs.jline.*" })
//@PrepareForTest(CraftItemFactory.class)