Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Sherko231 authored Feb 28, 2024
1 parent 763ac82 commit 7edc016
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Simple API to lock items (in inventory or in slot) for Nukkit

### Just register the item you want to lock in ``LockedItemRegistry`` when enabling your plugin

```java
LockedItemRegistry.registerLockedItem(ItemID.DIAMOND, true);
```
to lock item in slot ( you `can't` move the item in inventory but you can't drop it ).

```java
LockedItemRegistry.registerLockedItem(ItemID.DIAMOND, false);
```
to lock item in inventory ( you `can` move the item in inventory but you can't drop it )

0 comments on commit 7edc016

Please sign in to comment.