We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have an inventory condition which I apply to players to prevent them from moving items in their inventory:
public static final InventoryCondition readOnlyInventoryCondition = (player, slot, clickType, result) -> result.setCancel(true);
This works, except items in the hotbar can be moved by being put in the offhand (using the keybind), then by moving the held slot, and swapping back.
The swap should first check against the player's inventory conditions and respect the result.
This would affect PlayerDiggingListener#swapItemHand (line 153)
PlayerDiggingListener#swapItemHand
A temporary workaround for anyone else with this issue is to listen for PlayerSwapItemEvent and cancel it.
PlayerSwapItemEvent
EDIT: More experimentation shows this bug also applies to armour and the elytra when right-clicked.
The text was updated successfully, but these errors were encountered:
Will be closed by #1992
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
I have an inventory condition which I apply to players to prevent them from moving items in their inventory:
This works, except items in the hotbar can be moved by being put in the offhand (using the keybind), then by moving the held slot, and swapping back.
The swap should first check against the player's inventory conditions and respect the result.
This would affect
PlayerDiggingListener#swapItemHand
(line 153)A temporary workaround for anyone else with this issue is to listen for
PlayerSwapItemEvent
and cancel it.EDIT: More experimentation shows this bug also applies to armour and the elytra when right-clicked.
The text was updated successfully, but these errors were encountered: