Files
Anti-Inventories/README.md

78 lines
2.8 KiB
Markdown

# AntiInventories
AntiInventories is a small Paper 1.21.11 add-on for Multiverse-Inventories 5.
It lets selected worlds keep the inventory a player already has instead of
loading a different Multiverse-Inventories profile.
For example, with `AutoMine` configured:
```text
Wild_Forest1 -> AutoMine
```
The player arrives in `AutoMine` with the exact inventory they had in
`Wild_Forest1`. Login, logout, and optional game-mode profile handling are also
bypassed while the player is in a configured world, so reconnecting does not
silently replace that inventory.
## Requirements
- Paper 1.21.11
- Java 21 or newer
- Multiverse-Core 5
- Multiverse-Inventories 5.3.1 or newer
## Build
```bash
mvn clean package
```
The finished plugin is `target/AntiInventories-1.1.0.jar`.
## Install
1. Back up the Multiverse-Inventories data directory.
2. Put `AntiInventories-1.1.0.jar` in the server's `plugins` directory.
3. Make sure Multiverse-Core and Multiverse-Inventories are installed.
4. Start the server.
5. Edit `plugins/AntiInventories/config.yml`, or use the commands below.
## Commands
| Command | Purpose |
| --- | --- |
| `/antiinv add <world>` | Add a bypass world |
| `/antiinv remove <world>` | Remove a bypass world |
| `/antiinv forceremove <world>` | Remove the world from every explicit Multiverse-Inventories group and AntiInventories, then reload both plugins |
| `/antiinv list` | Show bypass worlds and direction |
| `/antiinv reload` | Reload `config.yml` |
The aliases `/antiinventories`, `/antiinv`, and `/ai` are available. Commands
require `antiinventories.admin`, which defaults to server operators.
`/antiinv list` also shows a clickable **Force remove** control beside each
bypass world. It places the force-removal command in chat for confirmation.
If a world belongs to a Multiverse-Inventories group through a wildcard or
regular expression, the command stops atomically and reports that pattern
instead of changing it and potentially removing other worlds.
## Direction setting
`bypass-direction` controls which crossings are ignored:
- `ENTERING`: keep the current inventory only when entering a bypass world.
- `LEAVING`: keep it only when leaving a bypass world.
- `EITHER`: keep it when either side is a bypass world.
`EITHER` is the default. Be aware that it intentionally lets a bypass world act
as a bridge between otherwise separated inventory groups. Use `ENTERING` if
players should carry items into `AutoMine` but should load the destination
profile when they leave it.
The plugin cancels Multiverse-Inventories' official share-handling event. It
does not duplicate, serialize, clear, or restore item stacks itself. Because
the whole Multiverse-Inventories transaction is skipped, other profile values
such as experience, health, and hunger also remain unchanged on a bypassed
crossing.