From 037da7e98070d8620eb2ce3e7b2216f4227aac17 Mon Sep 17 00:00:00 2001 From: NavidK0 Date: Sat, 1 Aug 2015 19:24:18 -0400 Subject: [PATCH] Updated for 1.8.8. Compiled against ProtocolLib 3.6.5. Fixed a nullpointerexception In Disguise when the disguise would rarely despawn causing the entity to be invalid. --- build.gradle | 6 +++--- .../me/libraryaddict/disguise/disguisetypes/Disguise.java | 2 ++ src/main/resources/plugin.yml | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 8a4010e4..b2dff2a4 100644 --- a/build.gradle +++ b/build.gradle @@ -11,9 +11,9 @@ plugins { println 'Compiling LibsDisguises via Gradle ver. ' + gradle.gradleVersion sourceCompatibility = '1.7' -ext.spigotVersion = '1.8.7-R0.1-SNAPSHOT' +ext.spigotVersion = '1.8.8-R0.1-SNAPSHOT' -ext.disguisesVersion = '8.6.2' +ext.disguisesVersion = '8.6.3' [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' @@ -100,7 +100,7 @@ ant.get src: 'https://www.dropbox.com/s/1ofgubrldjwamnk/spigot.jar?dl=1', dest: dependencies { compile 'org.bukkit:bukkit:' + project.ext.spigotVersion - compile 'com.comphenix.protocol:ProtocolLib:3.6.4-SNAPSHOT' + compile 'com.comphenix.protocol:ProtocolLib:3.6.5-SNAPSHOT' compile files( 'libs/spigot.jar' ) diff --git a/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java b/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java index 286b060f..0942b7b8 100644 --- a/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java +++ b/src/main/java/me/libraryaddict/disguise/disguisetypes/Disguise.java @@ -397,8 +397,10 @@ public abstract class Disguise { /** * Internal use + * @return */ public boolean isRemoveDisguiseOnDeath() { + if (getEntity() == null) return true; return getEntity() instanceof Player ? (!((Player) getEntity()).isOnline() ? !isKeepDisguiseOnPlayerLogout() : !isKeepDisguiseOnPlayerDeath()) diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index e9ff6d80..e41f3e1a 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,6 +1,6 @@ name: LibsDisguises main: me.libraryaddict.disguise.LibsDisguises -version: 8.6.2 +version: 8.6.3 author: libraryaddict authors: [Byteflux, Navid K.] depend: [ProtocolLib]