mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-01 12:20:59 +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:
@@ -31,7 +31,8 @@ public class Commandbanip extends EssentialsCommand
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
final String ipAddress = u.getLastLoginAddress();
|
final String ipAddress = u.getLastLoginAddress();
|
||||||
if (ipAddress.length() == 0) {
|
if (ipAddress.length() == 0)
|
||||||
|
{
|
||||||
throw new Exception(Util.i18n("playerNotFound"));
|
throw new Exception(Util.i18n("playerNotFound"));
|
||||||
}
|
}
|
||||||
ess.getServer().banIP(u.getLastLoginAddress());
|
ess.getServer().banIP(u.getLastLoginAddress());
|
||||||
|
@@ -50,7 +50,9 @@ public class Commandrepair extends EssentialsCommand
|
|||||||
final List<String> repaired = new ArrayList<String>();
|
final List<String> repaired = new ArrayList<String>();
|
||||||
repairItems(user.getInventory().getContents(), user, repaired);
|
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())
|
if (repaired.isEmpty())
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user