Merge pull request #1 from NotAlexNoyle/master
Merge from upstream while retaining Gradle/Purpur 1.19.4 support.
This commit was merged in pull request #1.
This commit is contained in:
commit
af60a3dcd1
1 file changed
+8
-4
@@ -445,7 +445,8 @@ public final class PlayerExpansion extends PlaceholderExpansion implements Confi
|
||||
case "no_damage_ticks":
|
||||
return String.valueOf(p.getNoDamageTicks());
|
||||
case "armor_helmet_name":
|
||||
return Optional.ofNullable(p.getInventory().getHelmet()).map(a -> a.getItemMeta().getDisplayName())
|
||||
return Optional.ofNullable(p.getInventory().getHelmet())
|
||||
.flatMap(item -> Optional.ofNullable(item.getItemMeta())).map(meta -> meta.getDisplayName())
|
||||
.orElse("");
|
||||
case "armor_helmet_data":
|
||||
return p.getInventory().getHelmet() != null
|
||||
@@ -454,7 +455,8 @@ public final class PlayerExpansion extends PlaceholderExpansion implements Confi
|
||||
case "armor_helmet_durability":
|
||||
return String.valueOf(durability(p.getInventory().getHelmet()));
|
||||
case "armor_chestplate_name":
|
||||
return Optional.ofNullable(p.getInventory().getChestplate()).map(a -> a.getItemMeta().getDisplayName())
|
||||
return Optional.ofNullable(p.getInventory().getChestplate())
|
||||
.flatMap(item -> Optional.ofNullable(item.getItemMeta())).map(meta -> meta.getDisplayName())
|
||||
.orElse("");
|
||||
case "armor_chestplate_data":
|
||||
return p.getInventory().getChestplate() != null
|
||||
@@ -463,7 +465,8 @@ public final class PlayerExpansion extends PlaceholderExpansion implements Confi
|
||||
case "armor_chestplate_durability":
|
||||
return String.valueOf(durability(p.getInventory().getChestplate()));
|
||||
case "armor_leggings_name":
|
||||
return Optional.ofNullable(p.getInventory().getLeggings()).map(a -> a.getItemMeta().getDisplayName())
|
||||
return Optional.ofNullable(p.getInventory().getLeggings())
|
||||
.flatMap(item -> Optional.ofNullable(item.getItemMeta())).map(meta -> meta.getDisplayName())
|
||||
.orElse("");
|
||||
case "armor_leggings_data":
|
||||
return p.getInventory().getLeggings() != null
|
||||
@@ -472,7 +475,8 @@ public final class PlayerExpansion extends PlaceholderExpansion implements Confi
|
||||
case "armor_leggings_durability":
|
||||
return String.valueOf(durability(p.getInventory().getLeggings()));
|
||||
case "armor_boots_name":
|
||||
return Optional.ofNullable(p.getInventory().getBoots()).map(a -> a.getItemMeta().getDisplayName())
|
||||
return Optional.ofNullable(p.getInventory().getBoots())
|
||||
.flatMap(item -> Optional.ofNullable(item.getItemMeta())).map(meta -> meta.getDisplayName())
|
||||
.orElse("");
|
||||
case "armor_boots_data":
|
||||
return p.getInventory().getBoots() != null ? String.valueOf(p.getInventory().getBoots().getDurability())
|
||||
|
||||
Reference in new issue
Block a user