BlueGit

timfa copper-key

Files

copper-key / README.md

README.md

chore: bump version to 1.1.0
timfa GitLab CI · pushed by timfa · 2 months ago
bb93ea17 History
README.md 2.0 KiB Download Raw

CopperKeys 1.1.0

Paper 26.2 plugin that adds a key item and event-driven locks for containers and openable blocks.

Requirements

  • Paper 26.2
  • Java 25
  • Resource pack in resource-pack/

Build

gradle clean build

The plugin jar is created in build/libs/.

Resource pack

Zip the contents of resource-pack/ so pack.mcmeta is at the root of the zip. A ready-to-use zip is distributed alongside the source archive.

The supplied texture is the user's 16x16 key sprite and is selected through the minecraft:item_model component (copperkeys:key).

Behaviour

  • Two copper nuggets placed diagonally craft a Blank Key.
  • Keys stack only with other keys that share the same binding (or other blank keys). Max stack size 64 so many fit in a Bundle.
  • Right-click a supported unlocked block with a Blank Key to bind it.
  • Bound keys display Unlocks <block name>.
  • Containers require the matching key somewhere in the player's inventory, including recursively inside Bundles and Shulker Boxes.
  • Locked doors/trapdoors/fence gates may always be closed, but cannot be opened without the matching key. Redstone may close them but may not open them.
  • Locked iron doors and iron trapdoors can be toggled open/closed by right-clicking with the matching key in hand.
  • Rename a bound key with /keyname <name> or an anvil; all copies with the same binding update. Blank keys cannot be named.
  • Advancements (toast only, no chat): Burglar, Oops..., Sharing is Caring, Heavy Duty, Locked Out, Organising.
  • Hopper transfers, hopper pickup/search and Copper Golem target validation are denied for locked containers.
  • Breaking either half of a double chest or either half of a door breaks the binding.
  • Keys found online are immediately blanked when their bound block is broken. Keys elsewhere are lazily blanked the next time the plugin encounters them.
  • No periodic world or inventory scan is used.

Persistence

Block bindings are stored in plugins/CopperKeys/locks.yml. The binding UUID itself is stored on the key item using the Persistent Data Container.

Source
1# CopperKeys 1.1.0
2
3Paper 26.2 plugin that adds a key item and event-driven locks for containers and openable blocks.
4
5## Requirements
6
7- Paper 26.2
8- Java 25
9- Resource pack in `resource-pack/`
10
11## Build
12
13```bash
14gradle clean build
15```
16
17The plugin jar is created in `build/libs/`.
18
19## Resource pack
20
21Zip the *contents* of `resource-pack/` so `pack.mcmeta` is at the root of the zip. A ready-to-use zip is distributed alongside the source archive.
22
23The supplied texture is the user's 16x16 key sprite and is selected through the `minecraft:item_model` component (`copperkeys:key`).
24
25## Behaviour
26
27- Two copper nuggets placed diagonally craft a `Blank Key`.
28- Keys stack only with other keys that share the same binding (or other blank keys). Max stack size 64 so many fit in a Bundle.
29- Right-click a supported unlocked block with a Blank Key to bind it.
30- Bound keys display `Unlocks <block name>`.
31- Containers require the matching key somewhere in the player's inventory, including recursively inside Bundles and Shulker Boxes.
32- Locked doors/trapdoors/fence gates may always be closed, but cannot be opened without the matching key. Redstone may close them but may not open them.
33- Locked iron doors and iron trapdoors can be toggled open/closed by right-clicking with the matching key in hand.
34- Rename a bound key with `/keyname <name>` or an anvil; all copies with the same binding update. Blank keys cannot be named.
35- Advancements (toast only, no chat): Burglar, Oops..., Sharing is Caring, Heavy Duty, Locked Out, Organising.
36- Hopper transfers, hopper pickup/search and Copper Golem target validation are denied for locked containers.
37- Breaking either half of a double chest or either half of a door breaks the binding.
38- Keys found online are immediately blanked when their bound block is broken. Keys elsewhere are lazily blanked the next time the plugin encounters them.
39- No periodic world or inventory scan is used.
40
41## Persistence
42
43Block bindings are stored in `plugins/CopperKeys/locks.yml`. The binding UUID itself is stored on the key item using the Persistent Data Container.