mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-09-12 01:48:07 +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.
|
* 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)
|
if (disguise == null)
|
||||||
return;
|
return -1;
|
||||||
if (disguise.getEntity() != null || DisguiseUtilities.getDisguises().containsValue(disguise)) {
|
if (disguise.getEntity() != null || DisguiseUtilities.getDisguises().containsValue(disguise)) {
|
||||||
disguise = disguise.clone();
|
disguise = disguise.clone();
|
||||||
}
|
}
|
||||||
@ -79,9 +79,11 @@ public class DisguiseAPI {
|
|||||||
field.setAccessible(true);
|
field.setAccessible(true);
|
||||||
int id = field.getInt(null);
|
int id = field.getInt(null);
|
||||||
DisguiseUtilities.addFutureDisguise(id, (TargetedDisguise) disguise);
|
DisguiseUtilities.addFutureDisguise(id, (TargetedDisguise) disguise);
|
||||||
|
return id;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user