From 60326253a29a8860b38b3e665d18b6965aff0a09 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Thu, 24 Apr 2014 09:50:26 +1200 Subject: [PATCH] Change the disguiseNextEntity to return a int --- src/me/libraryaddict/disguise/DisguiseAPI.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/me/libraryaddict/disguise/DisguiseAPI.java b/src/me/libraryaddict/disguise/DisguiseAPI.java index 0ab7fe8c..b7b1f7f5 100644 --- a/src/me/libraryaddict/disguise/DisguiseAPI.java +++ b/src/me/libraryaddict/disguise/DisguiseAPI.java @@ -68,9 +68,9 @@ public class DisguiseAPI { /** * Disguise the next entity to spawn with this disguise. This may not work however if the entity doesn't actually spawn. */ - public static void disguiseNextEntity(Disguise disguise) { + public static int disguiseNextEntity(Disguise disguise) { if (disguise == null) - return; + return -1; if (disguise.getEntity() != null || DisguiseUtilities.getDisguises().containsValue(disguise)) { disguise = disguise.clone(); } @@ -79,9 +79,11 @@ public class DisguiseAPI { field.setAccessible(true); int id = field.getInt(null); DisguiseUtilities.addFutureDisguise(id, (TargetedDisguise) disguise); + return id; } catch (Exception ex) { ex.printStackTrace(); } + return -1; } /**