Skip to content

Latest commit

 

History

History
53 lines (42 loc) · 2.38 KB

README.md

File metadata and controls

53 lines (42 loc) · 2.38 KB

LockBar

GitHub release (latest by date)

A Minecraft plugin that locks inventory slots. Locking a slot disables moving, dragging, dropping, and block placement for that slot.

Requires Java 11+

Building

Compile a .jar from the commandline by doing an install via Maven:

$ mvn install

It should show up in the target directory. Make sure to update your version number.


Commands

Command Description
/lock-all toggles locking entire inventory for all players
/lock-bar toggles locking entire hot bar for all players
/lock-slot <begin> <optional_end> locks the specified range of slots for all players
/unlock-slot <begin> <optional_end> unlocks the specified range of slots for all players
/unlock-ops toggles server OPs exemption from inventory locking

Config

Key Type Description
exempt-ops boolean enable / disable exempting server OPs from inventory locking
lock-all boolean enable / disable global inventory lock
lock-bar boolean enable / disable global hotbar lock
locked-slots integer list list of all currently globally locked hotbar slots

Example: only the first two hotbar slots will be locked

exempt-ops: true
lock-all: false
lock-bar: false
locked-slots:
- 0
- 1

Known Issues

  • Bukkit API makes stopping item drops from specific slots difficult to detect. My current workaround compares the dropped item type to the item type(s) in the locked slot(s). This means that dropping items from an unlocked slot will not work if it is the same type of item that is present in a locked slot. I am still working on finding a better solution.
  • Stopping block placement when using specified slots is also not yet supported.