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
@ -148,6 +148,8 @@ public class DisguiseRadiusCommand implements CommandExecutor {
|
|||||||
// Time to use it!
|
// Time to use it!
|
||||||
int disguisedEntitys = 0;
|
int disguisedEntitys = 0;
|
||||||
for (Entity entity : ((Player) sender).getNearbyEntities(radius, radius, radius)) {
|
for (Entity entity : ((Player) sender).getNearbyEntities(radius, radius, radius)) {
|
||||||
|
if (entity == sender)
|
||||||
|
continue;
|
||||||
DisguiseAPI.disguiseToAll(entity, disguise);
|
DisguiseAPI.disguiseToAll(entity, disguise);
|
||||||
disguisedEntitys++;
|
disguisedEntitys++;
|
||||||
}
|
}
|
||||||
|
@ -48,8 +48,12 @@ public class UndisguiseRadiusCommand implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
int disguisedEntitys = 0;
|
int disguisedEntitys = 0;
|
||||||
for (Entity entity : ((Player) sender).getNearbyEntities(radius, radius, radius)) {
|
for (Entity entity : ((Player) sender).getNearbyEntities(radius, radius, radius)) {
|
||||||
DisguiseAPI.undisguiseToAll(entity);
|
if (entity == sender)
|
||||||
disguisedEntitys++;
|
continue;
|
||||||
|
if (DisguiseAPI.isDisguised(entity)) {
|
||||||
|
DisguiseAPI.undisguiseToAll(entity);
|
||||||
|
disguisedEntitys++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sender.sendMessage(ChatColor.RED + "Successfully undisguised " + disguisedEntitys + " entities!");
|
sender.sendMessage(ChatColor.RED + "Successfully undisguised " + disguisedEntitys + " entities!");
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user