summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNecrodoom <doomed.war@gmail.com>2013-03-25 16:05:35 +0200
committerKHobbits <rob@khobbits.co.uk>2013-04-28 04:20:28 +0100
commite60f17bb5389d0108b767f7d6f783f4c192cba23 (patch)
treecd473b2374141888678e2bdc1054d75dd0a9b525
parenteb0c71984c1c3fc0f358799866bbd58f56bfc12a (diff)
downloadEssentials-e60f17bb5389d0108b767f7d6f783f4c192cba23.tar
Essentials-e60f17bb5389d0108b767f7d6f783f4c192cba23.tar.gz
Essentials-e60f17bb5389d0108b767f7d6f783f4c192cba23.tar.lz
Essentials-e60f17bb5389d0108b767f7d6f783f4c192cba23.tar.xz
Essentials-e60f17bb5389d0108b767f7d6f783f4c192cba23.zip
Fix radius in /remove and add world.
Fix SocialSpy Fix /killall world argument.
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandkillall.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandremove.java16
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandsocialspy.java14
-rw-r--r--Essentials/src/messages.properties1
-rw-r--r--Essentials/src/messages_cs.properties1
-rw-r--r--Essentials/src/messages_da.properties1
-rw-r--r--Essentials/src/messages_de.properties1
-rw-r--r--Essentials/src/messages_en.properties1
-rw-r--r--Essentials/src/messages_es.properties1
-rw-r--r--Essentials/src/messages_fi.properties1
-rw-r--r--Essentials/src/messages_fr.properties1
-rw-r--r--Essentials/src/messages_it.properties1
-rw-r--r--Essentials/src/messages_nl.properties1
-rw-r--r--Essentials/src/messages_pl.properties1
-rw-r--r--Essentials/src/messages_pt.properties1
-rw-r--r--Essentials/src/messages_ro.properties1
-rw-r--r--Essentials/src/messages_se.properties1
-rw-r--r--Essentials/src/plugin.yml6
18 files changed, 35 insertions, 19 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java b/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java
index 5ed76956d..854ed252c 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandkillall.java
@@ -53,6 +53,10 @@ public class Commandkillall extends EssentialsCommand
throw new Exception(_("numberRequired"), e);
}
}
+ if (args.length > 2)
+ {
+ world = ess.getWorld(args[2]);
+ }
}
else
{
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandremove.java b/Essentials/src/com/earth2me/essentials/commands/Commandremove.java
index 67517b7c8..2e7394c90 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandremove.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandremove.java
@@ -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
{
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsocialspy.java b/Essentials/src/com/earth2me/essentials/commands/Commandsocialspy.java
index a321fcf04..e5985a2fa 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandsocialspy.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandsocialspy.java
@@ -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
{
diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties
index b8a181842..d0165fa6b 100644
--- a/Essentials/src/messages.properties
+++ b/Essentials/src/messages.properties
@@ -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}
diff --git a/Essentials/src/messages_cs.properties b/Essentials/src/messages_cs.properties
index bfa66df1f..0bb449ca6 100644
--- a/Essentials/src/messages_cs.properties
+++ b/Essentials/src/messages_cs.properties
@@ -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}
diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties
index 0872db8cd..b103b23fc 100644
--- a/Essentials/src/messages_da.properties
+++ b/Essentials/src/messages_da.properties
@@ -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}
diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties
index b7bd1978a..8c4cdd10e 100644
--- a/Essentials/src/messages_de.properties
+++ b/Essentials/src/messages_de.properties
@@ -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}
diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties
index b8a181842..d0165fa6b 100644
--- a/Essentials/src/messages_en.properties
+++ b/Essentials/src/messages_en.properties
@@ -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}
diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties
index fe5b97092..fccd18329 100644
--- a/Essentials/src/messages_es.properties
+++ b/Essentials/src/messages_es.properties
@@ -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}
diff --git a/Essentials/src/messages_fi.properties b/Essentials/src/messages_fi.properties
index ded9440dc..246809d82 100644
--- a/Essentials/src/messages_fi.properties
+++ b/Essentials/src/messages_fi.properties
@@ -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}
diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties
index 384f239f5..2c6efe7cd 100644
--- a/Essentials/src/messages_fr.properties
+++ b/Essentials/src/messages_fr.properties
@@ -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}
diff --git a/Essentials/src/messages_it.properties b/Essentials/src/messages_it.properties
index 3339ac2ec..ba415179f 100644
--- a/Essentials/src/messages_it.properties
+++ b/Essentials/src/messages_it.properties
@@ -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}
diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties
index 75b0c98bb..d349d5a80 100644
--- a/Essentials/src/messages_nl.properties
+++ b/Essentials/src/messages_nl.properties
@@ -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}
diff --git a/Essentials/src/messages_pl.properties b/Essentials/src/messages_pl.properties
index 8625c64d8..8dc5095cf 100644
--- a/Essentials/src/messages_pl.properties
+++ b/Essentials/src/messages_pl.properties
@@ -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}
diff --git a/Essentials/src/messages_pt.properties b/Essentials/src/messages_pt.properties
index 01231eec4..a3af47fcf 100644
--- a/Essentials/src/messages_pt.properties
+++ b/Essentials/src/messages_pt.properties
@@ -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}
diff --git a/Essentials/src/messages_ro.properties b/Essentials/src/messages_ro.properties
index 88de7070c..2f525eeec 100644
--- a/Essentials/src/messages_ro.properties
+++ b/Essentials/src/messages_ro.properties
@@ -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}
diff --git a/Essentials/src/messages_se.properties b/Essentials/src/messages_se.properties
index f1b142b9f..e41278abd 100644
--- a/Essentials/src/messages_se.properties
+++ b/Essentials/src/messages_se.properties
@@ -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}
diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml
index 415e5f5a8..0a164234d 100644
--- a/Essentials/src/plugin.yml
+++ b/Essentials/src/plugin.yml
@@ -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.