mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-08-22 22:53:01 +02:00
Change the disguiseNextEntity to return a int
This commit is contained in:
parent
05a849a510
commit
60326253a2
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user