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,9 +48,13 @@ 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)) {
|
||||||
|
if (entity == sender)
|
||||||
|
continue;
|
||||||
|
if (DisguiseAPI.isDisguised(entity)) {
|
||||||
DisguiseAPI.undisguiseToAll(entity);
|
DisguiseAPI.undisguiseToAll(entity);
|
||||||
disguisedEntitys++;
|
disguisedEntitys++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
sender.sendMessage(ChatColor.RED + "Successfully undisguised " + disguisedEntitys + " entities!");
|
sender.sendMessage(ChatColor.RED + "Successfully undisguised " + disguisedEntitys + " entities!");
|
||||||
} else
|
} else
|
||||||
sender.sendMessage(ChatColor.RED + "You are forbidden to use this command!");
|
sender.sendMessage(ChatColor.RED + "You are forbidden to use this command!");
|
||||||
|
Loading…
Reference in New Issue
Block a user