Minecraft 1.8.5 compatibility.

This commit is contained in:
cnaude 2015-05-22 21:19:29 -07:00
parent c3b8bde799
commit 1699a7fa3a
4 changed files with 18 additions and 4 deletions

View File

@ -148,6 +148,12 @@
<version>1.8.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>spigot-185</artifactId>
<version>1.8.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>

View File

@ -93,6 +93,14 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>spigot-185</artifactId>
<version>1.8.5</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<!-- PircBotX -->
<dependency>
<groupId>com.cnaude.pircbotx</groupId>

View File

@ -30,7 +30,7 @@ import net.minecraft.server.v1_8_R3.PlayerInteractManager;
*
* @author cnaude
*/
public class NetPacket_184 {
public class NetPacket_184_185 {
public static PacketContainer add(String displayName) {
UUID uuid = UUID.nameUUIDFromBytes(("OfflinePlayer:" + displayName).getBytes(Charsets.UTF_8));

View File

@ -135,13 +135,13 @@ public class NetPackets {
} catch (Exception ex) {
plugin.logError("tabPacket: " + ex.getMessage());
}
} else if (version.contains("MC: 1.8.4")) {
} else if (version.contains("MC: 1.8.4") || version.contains("MC: 1.8.5")) {
try {
if (add) {
return NetPacket_184.add(displayName);
return NetPacket_184_185.add(displayName);
} else {
plugin.logDebug("T: Removing: " + name);
return NetPacket_184.rem(displayName);
return NetPacket_184_185.rem(displayName);
}
} catch (Exception ex) {
plugin.logError("tabPacket: " + ex.getMessage());