#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)

river fog
#

I'm making a /sell plugin in version 1.6.4, and all the items sell normally, except the lapis lazuli.

#

how do i send photos?

gritty cypress
#

1.16.4???

balmy viper
#

Praying you typo'd 1.16.4

river fog
balmy viper
#

*sigh*

gritty cypress
#

Why...

frosty garden
river fog
#

it's a modpack with zombies,guns

frosty garden
#

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

balmy viper
#

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

junior barn
#

Yeah it's like dye with a damage value of something

#

I don't remember the values

river fog
#

I can't update the server, the users of this modpack are a bit "dumb"

river fog
balmy viper
#

Right, sorry, ink sack, not dye lol

#

I would opt for DyeColor.BLUE.getDyeData() instead of 4, but yeah

river fog
#

like this?

`} else if (hasItem(p, Material.INK_SACK) && DyeColor.BLUE.getDyeData() == 4) {
venderItem(p, Material.INK_SACK, (byte) 4);

}`

#

or solo blue

balmy viper
#

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

river fog
#

`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;
}`