Please sign in to comment.
Improve a couple edge cases
Uses of GetCommandSender() don't always handle null, so let's use console just in case. This code should rarely run, though, since players in events shouldn't be offline. Also, because we have "enchants" in two places in item arrays, I tried to unify it a little by only prioritising meta array enchants, but it's possible that scripts might add an enchant to only the item enchant array and NOT the meta enchant array. To prioritise one over the other, it'd be safer if we first give a warning period. I'm not sure how best to accomplish this without affecting logic, so for now keep processing twice. It should be revisited later.
- Loading branch information...
Showing with 5 additions and 3 deletions.