mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 20:00:46 +00:00
Allow unbreakable to not take any arguments, defaulting to true. Fixes #377
This commit is contained in:
parent
117704b0bc
commit
203d6561ac
1 changed files with 3 additions and 2 deletions
|
@ -178,8 +178,9 @@ public class MetaItemStack {
|
|||
final ItemMeta meta = stack.getItemMeta();
|
||||
meta.setLore(lore);
|
||||
stack.setItemMeta(meta);
|
||||
} else if (split.length > 1 && (split[0].equalsIgnoreCase("unbreakable") && hasMetaPermission(sender, "unbreakable", false, true, ess))) {
|
||||
setUnbreakable(stack, Boolean.valueOf(split[1]));
|
||||
} else if (split[0].equalsIgnoreCase("unbreakable") && hasMetaPermission(sender, "unbreakable", false, true, ess)) {
|
||||
boolean value = split.length > 1 ? Boolean.valueOf(split[1]) : true;
|
||||
setUnbreakable(stack, value);
|
||||
} else if (split.length > 1 && (split[0].equalsIgnoreCase("player") || split[0].equalsIgnoreCase("owner")) && stack.getType() == Material.SKULL_ITEM && hasMetaPermission(sender, "head", false, true, ess)) {
|
||||
if (stack.getDurability() == 3) {
|
||||
final String owner = split[1];
|
||||
|
|
Loading…
Reference in a new issue