Placebo

Placebo

160M Downloads

ItemUseEvent doesn't allow for null player

KaptainWutax opened this issue ยท 1 comments

commented

The ItemUseEvent doesn't respect the contract of UseOnContext/ItemUsageContext which marks the player as @ Nullable. Since the hook fires for all use events, it causes compatibility issues for mods that do pass null for the player when creating fake usage contexts. We ran into this problem with the ispawner mod.

commented

This can probably be addressed for 1.19.2+ but older versions are out of development. You'd probably be best to simply use a fake player, as it seems you might be the only people in existence passing a null player to the context object.