-
Type:
Bug
-
Resolution: Invalid
-
Priority:
Minor
-
None
-
Affects Version/s: None
-
Environment:
Windows 10, Java 21 LTS
-
version 4504-Spigot-270012a-dacd062 (MC: 1.21.5) (Implementing API version 1.21.5-R0.1-SNAPSHOT)
-
Any?
-
Yes
Umm, how can I be 14 versions behind when I have built the jar within the past few minutes?
Anyway, without anything in my inventory.
When I do
// code placeholder
//Check extra
if (player.getInventory().getExtraContents() != null)
//Check all armor (includes shield!)
// if (player.getInventory().getArmorContents() != null) {//This seems to be broken
// player.sendMessage(ChatColor.RED+"You are wearing armor or holding a shield");
// ItemStack[] armors = player.getInventory().getArmorContents();
// for (ItemStack armor: armors)
// player.sendMessage(ChatColor.GOLD+"You must remove all of your armor first");
// return true;
// }}
The return is allways ExtraContents == true!
I have been developing in 1.21.4, but the problem remains the same in 1.21.5.
I know that the API for getArmorContents() should not include ExtraContents, but it is doing just that, even when there is nothing in the players inventory.