1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-07-31 11:50:35 +02:00

New permission: essentials.repair.armor

If a player has this permission '/repair all' will also repair equipped armor.
This commit is contained in:
KHobbits
2011-11-15 23:54:26 +00:00
parent 487b341f83
commit 929e2ce4c9
2 changed files with 5 additions and 2 deletions

View File

@@ -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());

View File

@@ -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())
{