Simplify offhand swapping
Description
Simplify number key and swap offhand inventory click events.
So this may be hard to understand, but i'll explain.
I was helping a Skript user on SkUnity Discord and their problem was a hard understanding of how to only cancel an event when a specific item was swapped using the number keys in an inventory click event from the hotbar to the offhand player slot when having the player's inventory open, and the only solution was;
on inventory click:
if click type is number key:
index of event-slot is 40:
slot hotbar button of event-inventory is a diamond:
broadcast "yes"
This pull request simplifies this process with
on inventory click:
if offhand item will be a diamond:
broadcast "yes"
This will mean no matter how the click event happens, if the offhand is modified, it'll be tracked with this future state.
I also removed the default expression from the setTime as it makes no sense to restrict it here. This basically means that offhand item would have worked and offhand item of player would not, because it would only work if it was a default expression. It now works for both.
Target Minecraft Versions: any Requirements: none Related Issues: none
Closing due to inactivity.
Closing due to inactivity