LabAPI icon indicating copy to clipboard operation
LabAPI copied to clipboard

[BUG]: ServerEvents.ItemSpawning doesnt work

Open ui2506 opened this issue 11 months ago • 1 comments

Before You Report

  • [x] I have searched for existing reports of this bug, and this bug report is unique.

Version

1.1.4

Description

If you set IsAllowed to False in the event, the item will still spawn

Image Image Image

To Reproduce

IsAllowed set to false

Expected Behavior

No response

Additional Information

None

ui2506 avatar Dec 20 '25 16:12 ui2506

When cancelled those are returning there:

Image Image Image

Also what you show is a Locker. There is no Event for when filling a locker , therefore I suggest.

foreach (var locker in Locker.List)
{
    locker.ClearLockerLoot();
    locker.ClearAllChambers();
}

Bonus fact. ItemSpawning only runs in ItemDistributor.ServerRegisterPickup

SlejmUr avatar Jan 09 '26 12:01 SlejmUr