summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2011-11-15 23:54:26 +0000
committerKHobbits <rob@khobbits.co.uk>2011-11-15 23:54:26 +0000
commite4c3f7b11576e8baafa511a509d4f6041823257b (patch)
tree1b74ef03e3f9e6c75a0ef52d1fb6baa024e95dda
parentf51b92c99e5527c76ffa248fc47d0f74c00d11ed (diff)
downloadEssentials-e4c3f7b11576e8baafa511a509d4f6041823257b.tar
Essentials-e4c3f7b11576e8baafa511a509d4f6041823257b.tar.gz
Essentials-e4c3f7b11576e8baafa511a509d4f6041823257b.tar.lz
Essentials-e4c3f7b11576e8baafa511a509d4f6041823257b.tar.xz
Essentials-e4c3f7b11576e8baafa511a509d4f6041823257b.zip
New permission: essentials.repair.armor
If a player has this permission '/repair all' will also repair equipped armor.
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandbanip.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandrepair.java4
2 files changed, 5 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbanip.java b/Essentials/src/com/earth2me/essentials/commands/Commandbanip.java
index 36ea479f9..eab34b122 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandbanip.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandbanip.java
@@ -31,7 +31,8 @@ public class Commandbanip extends EssentialsCommand
else
{
final String ipAddress = u.getLastLoginAddress();
- if (ipAddress.length() == 0) {
+ if (ipAddress.length() == 0)
+ {
throw new Exception(Util.i18n("playerNotFound"));
}
ess.getServer().banIP(u.getLastLoginAddress());
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java b/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java
index d6bcad464..26882ded4 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandrepair.java
@@ -50,7 +50,9 @@ public class Commandrepair extends EssentialsCommand
final List<String> repaired = new ArrayList<String>();
repairItems(user.getInventory().getContents(), user, repaired);
- repairItems(user.getInventory().getArmorContents(), user, repaired);
+ if (user.isAuthorized("essentials.repair.armor")) {
+ repairItems(user.getInventory().getArmorContents(), user, repaired);
+ }
if (repaired.isEmpty())
{