OneEnoughHand
This mod provides flexible and convenient offhand disabling functionality.
Key Features
Disable Offhand
When disabled:
- The offhand slot is hidden in the inventory screen
- Offhand hotkey becomes unresponsive
Note: Offhand items can still be modified via commands or KubeJS, with effects similar to the Curse of Binding.
Commands:
/offhand disable @a/offhand enable @a
Lock Offhand
When locked:
- No items are allowed in the offhand slot
- Existing items will be moved to empty inventory slots or dropped
Commands:
/offhand lock @a/offhand unlock @a
KubeJS Integration
Example usage (reference only):
let OEHUtil = Java.loadClass("com.mafuyu404.oneenoughhand.init.OEHUtil");
PlayerEvents.loggedIn(event => {
OEHUtil.disableOffhand(event.player);
OEHUtil.enableOffhand(event.player);
OEHUtil.lockOffhand(event.player);
OEHUtil.unlockOffhand(event.player);
});

