#I'm making a /sell plugin in version 1.6.4, and all the items sell normally, except the lapis lazuli
1 messages · Page 1 of 1 (latest)
1.16.4???
Praying you typo'd 1.16.4
no... 1.6.4 xd
*sigh*
Why...

it's a modpack with zombies,guns
you ain't gonna be any help with 1.6.4 I'd 1.8 you with the command but even that's not old enough
Mandatory "please update your server...", but the reason you're probably not getting the results you expect is because lapis lazuli was a dye pre-1.13
I can't update the server, the users of this modpack are a bit "dumb"
} else if (hasItem(p, Material.INK_SACK, (byte) 4)) {
venderItem(p, Material.INK_SACK, (byte) 4);
}
Right, sorry, ink sack, not dye lol
I would opt for DyeColor.BLUE.getDyeData() instead of 4, but yeah
like this?
`} else if (hasItem(p, Material.INK_SACK) && DyeColor.BLUE.getDyeData() == 4) {
venderItem(p, Material.INK_SACK, (byte) 4);
}`
or solo blue
No no, I just mean hasItem(p, Material.INK_SACK, DyeColor.BLUE.getDyeData())
For readability sake and ensuring that you actually have the correct data
Your fault may just lay in your hasItem() method I guess
`private boolean hasItem(Player player, Material material, byte data) {
ItemStack[] items = player.getInventory().getContents();
for (ItemStack item : items) {
if (item != null && item.getType() == material && item.getData().getData() == data) {
return true;
}
}
return false;
}`