mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-26 10:01:49 +01:00
Fix radius in /remove and add world.
Fix SocialSpy Fix /killall world argument.
This commit is contained in:
parent
eb0c71984c
commit
e60f17bb53
@ -53,6 +53,10 @@ public class Commandkillall extends EssentialsCommand
|
||||
throw new Exception(_("numberRequired"), e);
|
||||
}
|
||||
}
|
||||
if (args.length > 2)
|
||||
{
|
||||
world = ess.getWorld(args[2]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -37,10 +37,10 @@ public class Commandremove extends EssentialsCommand
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
ToRemove toRemove;
|
||||
final World world = user.getWorld();
|
||||
World world = user.getWorld();
|
||||
int radius = 0;
|
||||
|
||||
if (args.length < 2)
|
||||
if (args.length >= 2)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -51,6 +51,11 @@ public class Commandremove extends EssentialsCommand
|
||||
throw new Exception(_("numberRequired"), e);
|
||||
}
|
||||
}
|
||||
|
||||
if (args.length >= 3)
|
||||
{
|
||||
world = ess.getWorld(args[2]);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
@ -71,13 +76,8 @@ public class Commandremove extends EssentialsCommand
|
||||
{
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
World world;
|
||||
world = ess.getWorld(args[1]);
|
||||
World world = ess.getWorld(args[1]);
|
||||
|
||||
if (world == null)
|
||||
{
|
||||
throw new Exception(_("invalidWorld"));
|
||||
}
|
||||
ToRemove toRemove;
|
||||
try
|
||||
{
|
||||
|
@ -16,26 +16,24 @@ public class Commandsocialspy extends EssentialsCommand
|
||||
@Override
|
||||
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
|
||||
{
|
||||
if (args.length > 1 && user.isAuthorized("essentials.socialspy.others"))
|
||||
if (args.length > 0 && user.isAuthorized("essentials.socialspy.others"))
|
||||
{
|
||||
User target = getPlayer(server, user, args, 0);
|
||||
user.sendMessage("§7SocialSpy " + (target.toggleSocialSpy() ? _("enabled") : _("disabled")));
|
||||
|
||||
user.sendMessage(_("socialSpy", target.getDisplayName(), target.toggleSocialSpy() ? _("enabled") : _("disabled")));
|
||||
}
|
||||
else
|
||||
{
|
||||
user.sendMessage("§7SocialSpy " + (user.toggleSocialSpy() ? _("enabled") : _("disabled")));
|
||||
user.sendMessage(_("socialSpy", user.getDisplayName(), user.toggleSocialSpy() ? _("enabled") : _("disabled")));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
|
||||
{
|
||||
if (args.length > 1)
|
||||
if (args.length > 0)
|
||||
{
|
||||
User target = getPlayer(server, args, 0, true, false);
|
||||
sender.sendMessage("§7SocialSpy " + (target.toggleSocialSpy() ? _("enabled") : _("disabled")));
|
||||
|
||||
sender.sendMessage(_("socialSpy", target.getDisplayName(), target.toggleSocialSpy() ? _("enabled") : _("disabled")));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -534,3 +534,4 @@ pWeatherSet=\u00a76Player weather is set to \u00a7c{0}\u00a76 for: \u00a7c{1}.
|
||||
pWeatherInvalidAlias=\u00a74Invalid weather type
|
||||
cannotStackMob=\u00a74You do not have permission to stack multiple mobs.
|
||||
kitNotFound=\u00a74That kit does not exist.
|
||||
socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
|
||||
|
@ -537,3 +537,4 @@ pWeatherSet=\u00a76Player weather is set to \u00a7c{0}\u00a76 for: \u00a7c{1}.
|
||||
pWeatherInvalidAlias=\u00a74Invalid weather type
|
||||
cannotStackMob=\u00a74You do not have permission to stack multiple mobs
|
||||
kitNotFound=\u00a74That kit does not exist.
|
||||
socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
|
||||
|
@ -534,3 +534,4 @@ pWeatherSet=\u00a76Player weather is set to \u00a7c{0}\u00a76 for: \u00a7c{1}.
|
||||
pWeatherInvalidAlias=\u00a74Invalid weather type
|
||||
cannotStackMob=\u00a74You do not have permission to stack multiple mobs
|
||||
kitNotFound=\u00a74That kit does not exist.
|
||||
socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
|
||||
|
@ -534,3 +534,4 @@ pWeatherSet=\u00a76Player weather is set to \u00a7c{0}\u00a76 for: \u00a7c{1}.
|
||||
pWeatherInvalidAlias=\u00a74Invalid weather type
|
||||
cannotStackMob=\u00a74You do not have permission to stack multiple mobs
|
||||
kitNotFound=\u00a74That kit does not exist.
|
||||
socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
|
||||
|
@ -534,3 +534,4 @@ pWeatherSet=\u00a76Player weather is set to \u00a7c{0}\u00a76 for: \u00a7c{1}.
|
||||
pWeatherInvalidAlias=\u00a74Invalid weather type
|
||||
cannotStackMob=\u00a74You do not have permission to stack multiple mobs.
|
||||
kitNotFound=\u00a74That kit does not exist.
|
||||
socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
|
||||
|
@ -534,3 +534,4 @@ pWeatherSet=\u00a76Player weather is set to \u00a7c{0}\u00a76 for: \u00a7c{1}.
|
||||
pWeatherInvalidAlias=\u00a74Invalid weather type
|
||||
cannotStackMob=\u00a74You do not have permission to stack multiple mobs
|
||||
kitNotFound=\u00a74That kit does not exist.
|
||||
socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
|
||||
|
@ -534,3 +534,4 @@ pWeatherSet=\u00a76Player weather is set to \u00a7c{0}\u00a76 for: \u00a7c{1}.
|
||||
pWeatherInvalidAlias=\u00a74Invalid weather type
|
||||
cannotStackMob=\u00a74You do not have permission to stack multiple mobs
|
||||
kitNotFound=\u00a74That kit does not exist.
|
||||
socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
|
||||
|
@ -534,3 +534,4 @@ pWeatherSet=\u00a76Player weather is set to \u00a7c{0}\u00a76 for: \u00a7c{1}.
|
||||
pWeatherInvalidAlias=\u00a74Invalid weather type
|
||||
cannotStackMob=\u00a74You do not have permission to stack multiple mobs
|
||||
kitNotFound=\u00a74That kit does not exist.
|
||||
socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
|
||||
|
@ -534,3 +534,4 @@ pWeatherSet=\u00a76Player weather is set to \u00a7c{0}\u00a76 for: \u00a7c{1}.
|
||||
pWeatherInvalidAlias=\u00a74Invalid weather type
|
||||
cannotStackMob=\u00a74You do not have permission to stack multiple mobs
|
||||
kitNotFound=\u00a74That kit does not exist.
|
||||
socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
|
||||
|
@ -534,3 +534,4 @@ pWeatherSet=\u00a76Player weather is set to \u00a7c{0}\u00a76 for: \u00a7c{1}.
|
||||
pWeatherInvalidAlias=\u00a74Invalid weather type
|
||||
cannotStackMob=\u00a74You do not have permission to stack multiple mobs
|
||||
kitNotFound=\u00a74That kit does not exist.
|
||||
socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
|
||||
|
@ -534,3 +534,4 @@ pWeatherSet=\u00a77 Gracz ustawil pogode \u00a7c{0}\u00a77 dla: \u00a7c{1}.
|
||||
pWeatherInvalidAlias=\u00a74Niepoprawny typ pogody
|
||||
cannotStackMob=\u00a74Nie masz uprawnien by stackowac wiele mobow
|
||||
kitNotFound=\u00a74That kit does not exist.
|
||||
socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
|
||||
|
@ -534,3 +534,4 @@ pWeatherSet=\u00a76Player weather is set to \u00a7c{0}\u00a76 for: \u00a7c{1}.
|
||||
pWeatherInvalidAlias=\u00a74Invalid weather type
|
||||
cannotStackMob=\u00a74You do not have permission to stack multiple mobs
|
||||
kitNotFound=\u00a74That kit does not exist.
|
||||
socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
|
||||
|
@ -534,3 +534,4 @@ pWeatherSet=\u00a76Player weather is set to \u00a7c{0}\u00a76 for: \u00a7c{1}.
|
||||
pWeatherInvalidAlias=\u00a74Invalid weather type
|
||||
cannotStackMob=\u00a74You do not have permission to stack multiple mobs
|
||||
kitNotFound=\u00a74That kit does not exist.
|
||||
socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
|
||||
|
@ -534,3 +534,4 @@ pWeatherSet=\u00a76Player weather is set to \u00a7c{0}\u00a76 for: \u00a7c{1}.
|
||||
pWeatherInvalidAlias=\u00a74Invalid weather type
|
||||
cannotStackMob=\u00a74You do not have permission to stack multiple mobs
|
||||
kitNotFound=\u00a74That kit does not exist.
|
||||
socialSpy=\u00a76SocialSpy for {0}\u00a76: {1}
|
||||
|
@ -205,7 +205,7 @@ commands:
|
||||
aliases: [ekill]
|
||||
killall:
|
||||
description: Kill all mobs in a world.
|
||||
usage: /<command> [mobType] [radius]
|
||||
usage: /<command> [mobType] [radius] [world]
|
||||
aliases: [butcher,ebutcher,ekillall,mobkill,emobkill]
|
||||
kit:
|
||||
description: Obtains the specified kit or views all available kits.
|
||||
@ -300,7 +300,7 @@ commands:
|
||||
aliases: [formula,eformula,method,emethod,erecipe,recipes,erecipes]
|
||||
remove:
|
||||
description: Removes entities in your world.
|
||||
usage: /<command> <drops|arrows|boats|minecarts|xp|paintings> [radius]
|
||||
usage: /<command> <drops|arrows|boats|minecarts|xp|paintings> [radius] [world]
|
||||
aliases: [eremove]
|
||||
repair:
|
||||
description: Repairs the durability of all or one item.
|
||||
@ -336,7 +336,7 @@ commands:
|
||||
aliases: [esetworth]
|
||||
socialspy:
|
||||
description: Toggles if you can see msg/mail commands in chat.
|
||||
usage: /<command>
|
||||
usage: /<command> [player]
|
||||
aliases: [esocialspy]
|
||||
spawner:
|
||||
description: Change the mob type of a spawner.
|
||||
|
Loading…
Reference in New Issue
Block a user