mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2025-02-14 04:38:11 +00:00
Fixed error
This commit is contained in:
parent
ea5547a6c6
commit
e80523c59f
1 changed files with 3 additions and 1 deletions
|
@ -80,7 +80,7 @@ public class DisguiseAPI {
|
|||
* - The disguise to wear
|
||||
*/
|
||||
public static void disguiseToAll(Entity entity, Disguise disguise) {
|
||||
if (disguise == null)
|
||||
if (entity == null || disguise == null)
|
||||
return;
|
||||
Disguise oldDisguise = getDisguise(entity);
|
||||
DisguisedEvent event = new DisguisedEvent(entity, disguise);
|
||||
|
@ -132,6 +132,8 @@ public class DisguiseAPI {
|
|||
* @return Disguise
|
||||
*/
|
||||
public static Disguise getDisguise(Entity disguiser) {
|
||||
if (disguiser == null)
|
||||
return null;
|
||||
return disguises.get(disguiser.getEntityId());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue