Skip to content
/ LockBar Public
forked from EmiCB/LockBar

A Minecraft plugin that locks an item to a hotbar slot.

Notifications You must be signed in to change notification settings

whimc/LockBar

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A Minecraft plugin that locks an item to a hotbar slot.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%