You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+41-5Lines changed: 41 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## Project Overview
6
6
7
-
AcidIsland is a BentoBox GameModeAddon for Minecraft (Spigot/Paper). It implements a Skyblock-like game mode where the ocean is acid that damages players, mobs, and items. Requires BentoBox as the parent plugin framework.
7
+
AcidIsland is a BentoBox GameModeAddon for Minecraft (Paper). It implements a Skyblock-like game mode where the ocean is acid that damages players, mobs, and items. Requires BentoBox 3.12.0+ as the parent plugin framework.
8
8
9
9
## Build Commands
10
10
@@ -30,18 +30,54 @@ This is a BentoBox addon, not a standalone plugin. The lifecycle flows through:
30
30
### Key Packages
31
31
32
32
-**`listeners/`** — `AcidEffect` is the core gameplay listener handling all acid damage (players, mobs, items, armor protection, potion effects, Essentials integration). `LavaCheck` prevents normal stone generation from lava+acid water.
33
-
-**`world/`** — `ChunkGeneratorWorld` generates ocean floor terrain using Perlin noise. `AcidTask` is a repeating BukkitRunnable applying acid damage to entities in water. `AcidBiomeProvider` provides biomes per environment type.
33
+
-**`world/`** — `ChunkGeneratorWorld` generates ocean floor terrain using Perlin noise. `AcidTask` is a repeating task applying acid damage to entities in water. `AcidBiomeProvider` provides biomes per environment type.
34
34
-**`events/`** — Custom Bukkit events (`AcidEvent`, `AcidRainEvent`, `EntityDamageByAcidEvent`, etc.) that are cancellable, allowing other plugins to modify acid behavior.
35
35
36
36
### Testing
37
37
38
-
Tests use **JUnit 5 + Mockito**. For static Bukkit methods, use Mockito static mocking via `Mockito.mockStatic` rather than adding new JUnit 4/PowerMock-based tests. The Surefire plugin is configured with extensive `--add-opens` JVM args for Java 21 compatibility. `ServerMocks` utility class provides reusable mock server setup.
38
+
Tests use **JUnit 5 + MockBukkit + Mockito 5**. The standard pattern for each test class:
-**Do NOT call `Mockito.framework().clearInlineMocks()` in `@AfterEach`** — it disables `@BeforeAll` mocks and interferes with MockitoExtension's mock lifecycle for subsequent tests.
66
+
- Always mock `Bukkit::getMinecraftVersion` — BentoBox 3.12.0 calls it in a static initializer and Paper API is required for it to exist on the classpath.
67
+
-`paper-api` is a `provided` dependency (not `spigot-api`) — this is what puts `getMinecraftVersion()` on the compile/test classpath.
68
+
- MockBukkit's JUnit transitive deps are excluded in `pom.xml` to avoid JUnit 6 version conflicts with surefire.
69
+
- Do not use `new ItemStack(Material.AIR)` in tests — use `null` for empty armor slots; Paper 1.21's ItemStack handles AIR differently.
70
+
- Do not reference `world.bentobox.bentobox.lists.Flags` static fields in tests — the class static initializer requires full BentoBox initialization. Use the string flag ID instead (e.g., `"ANIMAL_NATURAL_SPAWN"`).
71
+
72
+
### Locales
73
+
74
+
All 24 locale files use **MiniMessage format** (e.g., `<red>`, `<dark_blue>`). Legacy `&` color codes must not be used. BentoBox 3.12.0+ is required for MiniMessage support.
39
75
40
76
### Configuration
41
77
42
78
-`src/main/resources/config.yml` — Default config with acid damage values, rain settings, potion effects, world generation params
43
-
-`src/main/resources/addon.yml` — BentoBox addon metadata and permissions
44
-
-`src/main/resources/locales/` — 24 language translation files
79
+
-`src/main/resources/addon.yml` — BentoBox addon metadata and permissions (requires `api-version: 3.12.0`)
80
+
-`src/main/resources/locales/` — 24 language translation files (MiniMessage format)
45
81
-`src/main/resources/blueprints/` — Island templates (overworld, nether, end)
0 commit comments