Skip to content

Commit 27aaaba

Browse files
committed
chore: update readme
1 parent 1542ff8 commit 27aaaba

1 file changed

Lines changed: 31 additions & 31 deletions

File tree

README.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
1-
# FakeInventories [![](https://jitpack.io/v/IWareQ/FakeInventories.svg)](https://jitpack.io/#IWareQ/FakeInventories)
1+
# FakeInventories
22

3-
FakeInventories is a simple library plugin for PowerNukkit/Nukkit Minecraft Bedrock core, that will help you to create
3+
FakeInventories is a simple library plugin for Lumi and Nukkit-MOT Minecraft Bedrock server software, that will help you to create
44
your custom virtual inventories with ease.
55

6-
##### [Download](https://github.com/IWareQ/FakeInventories/releases)
6+
### [Download the plugin](https://github.com/LuminiaDev/FakeInventories/releases)
77

8-
## Usage
8+
## How to use
99

1010
```java
11-
FakeInventory inventory = new FakeInventory(InventoryType.CHEST, "custom title");
11+
FakeInventory inventory = new FakeInventory(InventoryType.CHEST, "Custom inventory");
1212

1313
inventory.setDefaultItemHandler((item, event) -> {
1414
event.setCancelled(true);
1515

1616
Player target = event.getTransaction().getSource();
17-
1817
target.sendMessage("is default item handler");
1918
});
2019

21-
inventory.addItems((item, event) -> {
22-
event.setCancelled(true);
23-
24-
Player target = event.getTransaction().getSource();
25-
26-
target.sendMessage("is custom item handler in addItem method");
27-
28-
target.removeWindow(inventory);
29-
}, Item.get(Item.IRON_BLOCK), Item.get(Item.IRON_BAR))
30-
3120
inventory.setItem(5, Item.get(Item.DIAMOND), (item, event) -> {
3221
event.setCancelled(true);
3322

3423
Player target = event.getTransaction().getSource();
35-
3624
target.sendMessage("is custom item handler");
37-
3825
target.removeWindow(inventory);
3926
});
4027

4128
player.addWindow(inventory);
4229
```
4330

44-
## Maven
45-
46-
#### Repository
31+
> [!WARNING]
32+
> To open fake inventory from the chat window or form, you need to add a delay of 10-20 ticks so that the window has time to close, otherwise the inventory will not open.
4733
34+
## Maven
35+
Adding repo:
4836
```xml
49-
<repositories>
50-
<repository>
51-
<id>jitpack.io</id>
52-
<url>https://jitpack.io</url>
53-
</repository>
54-
</repositories>
37+
<repository>
38+
<id>luminiadev-repository-releases</id>
39+
<url>https://repo.luminiadev.com/releases</url>
40+
</repository>
5541
```
5642

57-
#### Dependency
43+
Adding dependency:
5844
```xml
5945
<dependency>
60-
<groupId>com.github.IWareQ</groupId>
61-
<artifactId>FakeInventories</artifactId>
62-
<version>Version</version>
46+
<groupId>com.luminiadev.fakeinventories</groupId>
47+
<artifactId>fakeinventories</artifactId>
48+
<version>1.2.0</version>
6349
</dependency>
50+
```
51+
52+
## Gradle
53+
Adding repo:
54+
```kts
55+
maven {
56+
name = "luminiadevRepositoryReleases"
57+
url = uri("https://repo.luminiadev.com/releases")
58+
}
59+
```
60+
61+
Adding dependency:
62+
```kts
63+
compileOnly("com.luminiadev.fakeinventories:fakeinventories:1.2.0")
6464
```

0 commit comments

Comments
 (0)