#What can cause an event not to fire in some cases? [SOLVED]

1 messages · Page 1 of 1 (latest)

ionic pagoda
#

Spigot 1.20.4

I am completely lost with this, I have a BlockDamageEvent that does nothing but write a log message, however it is selectively triggering based on whether I am holding a custom item or not. If I hold my fist or a vanilla item I get a log message, but if I hold an item with custom lore, PDC data etc, nothing is logged. This code worked completely fine 4 months ago when I last worked on this in 1.20.1, which I have tested it in as well, where it is behaving the same way

Anyone have a clue what might cause this?

ionic pagoda
#

this is the event, the logs when using my fist, and the custom item that is not firing the same logs/event

ionic pagoda
#

commenting out the following allows the item to trigger the event, but they are so similar, I cannot possibly see why it would make any difference

#

they both just set a PDC String

#

same thing happens if I set it with a hardcoded string

ionic pagoda
#

even if I am doing something wrong here with PDC's, why on earth that should effect whether an event gets called or not, without any stacktrace is beyond me

Edit: The content of the PDC's is working perfectly fine as expected, something about this specific PDC is causing the event to fail and not get triggered, the only difference is that this has the getID() function as a static function, and hence so is the variable IDKey. But setting both of these as local values in the respective functions also causes the same behaviour. The only thing left is if the causation of this, is purely because the getID() function is static, which would be absurd

#

I hope someone sees what I am missing

ionic pagoda
#

What can cause an event not to fire in some cases? [SOLVED]

#

Solution: Completely unrelated to PDC's