mirror of
https://github.com/plexusorg/Plex.git
synced 2024-06-10 07:01:46 +00:00
Tweaked the command a bit. It works as it should now.
This commit is contained in:
parent
8bf772b502
commit
3c1d0b5564
|
@ -55,14 +55,21 @@ public class MobPurgeCMD extends PlexCommand {
|
|||
int count = purgeMobs(type);
|
||||
if (type != null) {
|
||||
PlexUtils.broadcast(messageComponent("removedEntitiesOfTypes", sender.getName(), count, mobName));
|
||||
PlexLog.debug("All " + count + " valid mobs were removed");
|
||||
PlexLog.debug("All " + count + " of " + mobName + " were removed");
|
||||
} else {
|
||||
PlexUtils.broadcast(messageComponent("removedMobs", sender.getName(), count));
|
||||
PlexLog.debug("All " + count + " valid mobs were removed");
|
||||
}
|
||||
sender.sendMessage(messageComponent("amountOfMobsRemoved", count, (type != null ? mobName : "mob") + multipleS(count)));
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String multipleS(int count) {
|
||||
return (count == 1 ? "" : "s");
|
||||
}
|
||||
|
||||
// Removes the mobs.
|
||||
|
||||
public int purgeMobs(EntityType type) {
|
||||
int removed = 0;
|
||||
for (World world : Bukkit.getWorlds()) {
|
||||
|
|
|
@ -160,7 +160,9 @@ removedEntitiesOfType: "<gray>Removed {1} {2}"
|
|||
# 0 - Entity type that is invalid
|
||||
invalidEntityType: "<gray>Notice: Entity type {0} is invalid!"
|
||||
noRemovedEntities: "<gray>No entities were removed."
|
||||
noRemovedMobs: "<gray>No mobs were removed."
|
||||
# 0 - Number of mobs removed
|
||||
# 1 - Type of mob removed
|
||||
amountOfMobsRemoved: "<gray>{0} {1} removed."
|
||||
notAValidMob: "<red>That is not a valid mob."
|
||||
notAValidMobButValidEntity: "<red>That is a valid entity, but is not a valid mob."
|
||||
# 0 - The command sender
|
||||
|
|
Loading…
Reference in New Issue
Block a user