mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2024-11-11 01:17:16 +00:00
Read desc
Don't disguise the command sender when doing a radius Fixed saying a incorrect entity count when undisguising
This commit is contained in:
parent
d3da599ea8
commit
e7f283dc25
2 changed files with 8 additions and 2 deletions
|
@ -148,6 +148,8 @@ public class DisguiseRadiusCommand implements CommandExecutor {
|
|||
// Time to use it!
|
||||
int disguisedEntitys = 0;
|
||||
for (Entity entity : ((Player) sender).getNearbyEntities(radius, radius, radius)) {
|
||||
if (entity == sender)
|
||||
continue;
|
||||
DisguiseAPI.disguiseToAll(entity, disguise);
|
||||
disguisedEntitys++;
|
||||
}
|
||||
|
|
|
@ -48,8 +48,12 @@ public class UndisguiseRadiusCommand implements CommandExecutor {
|
|||
}
|
||||
int disguisedEntitys = 0;
|
||||
for (Entity entity : ((Player) sender).getNearbyEntities(radius, radius, radius)) {
|
||||
DisguiseAPI.undisguiseToAll(entity);
|
||||
disguisedEntitys++;
|
||||
if (entity == sender)
|
||||
continue;
|
||||
if (DisguiseAPI.isDisguised(entity)) {
|
||||
DisguiseAPI.undisguiseToAll(entity);
|
||||
disguisedEntitys++;
|
||||
}
|
||||
}
|
||||
sender.sendMessage(ChatColor.RED + "Successfully undisguised " + disguisedEntitys + " entities!");
|
||||
} else
|
||||
|
|
Loading…
Reference in a new issue