Matocolotoe / Skript-1.8

The Skript plugin made for Minecraft 1.8.x only. Releases will follow the original repository, except for some bug fixes. Please read the README before updating to Skript-1.8 !
https://discord.gg/yh3Z98m
GNU General Public License v3.0
49 stars 4 forks source link

Problem of comparing ItemTypes #32

Closed Romitou closed 2 years ago

Romitou commented 3 years ago

For example, using the code below, the ItemType#isTypeOf method does not work as expected, with for example nether warts:

on click on nether wart:
    broadcast "test"

Related code: https://github.com/Matocolotoe/Skript-1.8/blob/master/src/main/java/ch/njol/skript/events/EvtClick.java#L197 The ItemStack of o equals ItemStack{NETHER_WARTS x 1} while the ItemStack of block equals ItemStack{NETHER_STALK x 1}, which means that the event does not work.

AyhamAl-Ali commented 3 years ago

I think this might help https://github.com/SkriptLang/Skript/pull/4162 :+1:

Matocolotoe commented 3 years ago

The issue doesn't occur on 1.9+ with official Skript builds, with or without this pull request, so it's only related to 1.8 I guess.