LabAPI
LabAPI copied to clipboard
[BUG]: ServerEvents.ItemSpawning doesnt work
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
To Reproduce
IsAllowed set to false
Expected Behavior
No response
Additional Information
None
When cancelled those are returning there:
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