Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
1c1a8b3
Update CLAUDE.md to reflect current project state
tastybento Apr 4, 2026
bd5febc
Support Minecraft 26.1.1 world file structure in region purge
tastybento Apr 5, 2026
fe1b03e
Merge pull request #2902 from BentoBoxWorld/worktree-feature+filesyst…
tastybento Apr 5, 2026
5ae0f4a
Update build version from 3.13.0 to 3.13.1
tastybento Apr 5, 2026
c2b161b
Initial plan
Copilot Apr 5, 2026
2c798a6
Fix MiniMessage formatting: disable default italic on panel items and…
Copilot Apr 5, 2026
278ad3c
Merge pull request #2903 from BentoBoxWorld/copilot/fix-minimassage-f…
tastybento Apr 5, 2026
7a4cdd4
Fix Czech (cs.yml) locale: correct mistranslations, typos, broken tag…
tastybento Apr 5, 2026
6eaeea9
Fix German (de.yml) locale: correct mistranslations, typos, broken ta…
tastybento Apr 5, 2026
86d379e
Fix Spanish (es.yml) locale: correct mistranslations, typos, broken t…
tastybento Apr 5, 2026
55a7e34
Fix French (fr.yml) locale: fix 30+ broken legacy tags, mistranslatio…
tastybento Apr 5, 2026
709934b
Fix Italian (it.yml) locale: correct mistranslations, typos, broken t…
tastybento Apr 5, 2026
6df3352
Fix Korean (ko.yml) locale: translate English strings, fix broken cod…
tastybento Apr 5, 2026
e077f75
Fix Hungarian (hu.yml) locale: translate untranslated strings and fix…
tastybento Apr 5, 2026
e064564
Fix Japanese (ja.yml) locale: translate untranslated strings, fix mis…
tastybento Apr 5, 2026
d93c562
Fix Ukrainian (uk.yml) locale: translate remaining English strings an…
tastybento Apr 5, 2026
bdc23c1
Fix Croatian (hr.yml) locale: fix broken tags, mistranslations, and u…
tastybento Apr 5, 2026
d0fc514
Fix Brazilian Portuguese (pt-BR.yml) locale: translate English string…
tastybento Apr 5, 2026
e9e5f55
Fix Polish (pl.yml) locale: translate untranslated sections, fix typo…
tastybento Apr 5, 2026
49cbb28
Fix Portuguese (pt.yml) locale: translate untranslated strings, fix b…
tastybento Apr 5, 2026
2c2b089
Fix Simplified Chinese (zh-CN.yml) locale: translate untranslated str…
tastybento Apr 5, 2026
3b66ed0
Fix Latvian (lv.yml) locale: translate untranslated strings and fix w…
tastybento Apr 5, 2026
41e7019
Fix Russian (ru.yml) locale: translate untranslated strings, fix typo…
tastybento Apr 5, 2026
169131f
Fix Romanian (ro.yml) locale: translated placeholders, broken tags, w…
tastybento Apr 5, 2026
62d8e76
Fix Turkish (tr.yml) locale: translate untranslated strings, fix brok…
tastybento Apr 5, 2026
5de0f4e
Fix Vietnamese (vi.yml) locale: translate English strings, fix typos …
tastybento Apr 5, 2026
34aa40f
Fix Indonesian (id.yml) locale: broken color codes, untranslated stri…
tastybento Apr 5, 2026
c14ba47
Fix Traditional Chinese HK (zh-HK.yml) locale: translate English stri…
tastybento Apr 5, 2026
6f21205
Fix Dutch (nl.yml) locale: correct mistranslations, placeholders, and…
tastybento Apr 5, 2026
1451d83
Fix German (de.yml) locale: correct mistranslations, typos, broken ta…
tastybento Apr 5, 2026
411b550
Fix Spanish (es.yml) locale: correct mistranslations, typos, broken t…
tastybento Apr 5, 2026
770b3d1
Fix French (fr.yml) locale: fix 30+ broken legacy tags, mistranslatio…
tastybento Apr 5, 2026
b3da899
Fix Italian (it.yml) locale: correct mistranslations, typos, broken t…
tastybento Apr 5, 2026
3977d6f
Fix Korean (ko.yml) locale: translate English strings, fix broken cod…
tastybento Apr 5, 2026
1f7b4a6
Fix Hungarian (hu.yml) locale: translate untranslated strings and fix…
tastybento Apr 5, 2026
5ce920e
Fix Japanese (ja.yml) locale: translate untranslated strings, fix mis…
tastybento Apr 5, 2026
a570116
Fix Ukrainian (uk.yml) locale: translate remaining English strings an…
tastybento Apr 5, 2026
6911b26
Fix Croatian (hr.yml) locale: fix broken tags, mistranslations, and u…
tastybento Apr 5, 2026
d94e2d7
Fix Brazilian Portuguese (pt-BR.yml) locale: translate English string…
tastybento Apr 5, 2026
9a65400
Fix Polish (pl.yml) locale: translate untranslated sections, fix typo…
tastybento Apr 5, 2026
96771b1
Fix Portuguese (pt.yml) locale: translate untranslated strings, fix b…
tastybento Apr 5, 2026
6682741
Fix Simplified Chinese (zh-CN.yml) locale: translate untranslated str…
tastybento Apr 5, 2026
98a999d
Fix Latvian (lv.yml) locale: translate untranslated strings and fix w…
tastybento Apr 5, 2026
4786c44
Fix Russian (ru.yml) locale: translate untranslated strings, fix typo…
tastybento Apr 5, 2026
9f3e58a
Fix Romanian (ro.yml) locale: translated placeholders, broken tags, w…
tastybento Apr 5, 2026
131c141
Fix Turkish (tr.yml) locale: translate untranslated strings, fix brok…
tastybento Apr 5, 2026
03bc988
Fix Vietnamese (vi.yml) locale: translate English strings, fix typos …
tastybento Apr 5, 2026
833916a
Fix Indonesian (id.yml) locale: broken color codes, untranslated stri…
tastybento Apr 5, 2026
3752e1f
Fix Traditional Chinese HK (zh-HK.yml) locale: translate English stri…
tastybento Apr 5, 2026
1f26c55
Fix Dutch (nl.yml) locale: correct mistranslations, placeholders, and…
tastybento Apr 5, 2026
5271cae
Merge pull request #2905 from BentoBoxWorld/fix/locale-corrections
tastybento Apr 5, 2026
96ef040
Initial plan
Copilot Apr 5, 2026
e16a901
Fix bold text continuing past closing tag in prefix translations
Copilot Apr 5, 2026
e811747
Remove placeholder issue number from test Javadoc
Copilot Apr 5, 2026
7f37ee3
Merge pull request #2907 from BentoBoxWorld/copilot/fix-bold-formatti…
tastybento Apr 5, 2026
cd6c3a5
Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox i…
tastybento Apr 5, 2026
89c6f11
Improve warning messages for incompatible addons in AddonsManager
tastybento Apr 5, 2026
3b124a8
Add chunk pre-generation manager with tests and config
tastybento Apr 5, 2026
34ddde3
Initial plan
Copilot Apr 5, 2026
1929b19
Initial plan
Copilot Apr 5, 2026
425692f
test: add VISITED_ISLAND_RANK assertions to GameModePlaceholderTest
Copilot Apr 5, 2026
5b034eb
Initial plan
Copilot Apr 5, 2026
31ceb9c
feat: Add message delivery type tags for locale strings (actionbar, t…
Copilot Apr 5, 2026
f2bdf27
refactor: Improve Javadoc for sound format conversion and extract par…
Copilot Apr 5, 2026
6a68cd9
Switch blueprints from zipped .blu to plain JSON .blueprint format wi…
Copilot Apr 5, 2026
2425bfa
Initial plan
Copilot Apr 5, 2026
d2c2d3c
Merge pull request #2909 from BentoBoxWorld/copilot/add-bskyblock-vis…
tastybento Apr 5, 2026
183a218
Add filename length validation for blueprint file scanning
Copilot Apr 5, 2026
f885b1e
Merge pull request #2910 from BentoBoxWorld/copilot/add-message-send-…
tastybento Apr 5, 2026
e708840
Merge branch 'develop' into copilot/define-island-blueprint-text-files
tastybento Apr 5, 2026
d0f3180
Add Island Defaults tab to Admin Settings GUI for editing default pro…
Copilot Apr 5, 2026
d0784d6
Merge pull request #2912 from BentoBoxWorld/copilot/add-default-islan…
tastybento Apr 5, 2026
e3c2148
Merge pull request #2911 from BentoBoxWorld/copilot/define-island-blu…
tastybento Apr 6, 2026
f361f4a
Initial plan
Copilot Apr 6, 2026
25cc658
Add flag state placeholders for game mode addons
Copilot Apr 6, 2026
23e3ac2
Initial plan
Copilot Apr 6, 2026
091885a
Add lava tip hologram for newly formed scoopable obsidian
Copilot Apr 6, 2026
090adbd
Refactor: store BentoBox.getInstance() in local variable
Copilot Apr 6, 2026
851820a
Merge pull request #2913 from BentoBoxWorld/copilot/add-placeholders-…
tastybento Apr 6, 2026
ac334e0
Merge pull request #2915 from BentoBoxWorld/copilot/add-hologram-noti…
tastybento Apr 6, 2026
fcaf3d1
Disable chunk pre-generation in config.yml to reduce resource usage
tastybento Apr 6, 2026
ebe27f2
Update version annotations and documentation for island protection se…
tastybento Apr 6, 2026
f85e1fd
Bump build version to 3.14.0
tastybento Apr 6, 2026
2272aee
Defer chunk pre-gen until after server load and avoid main-thread stalls
tastybento Apr 6, 2026
dae71e7
Update obsidian scooping lava tip duration and improve related messages
tastybento Apr 6, 2026
1580ab3
Remove obsidian lava tip hologram immediately when scooped
tastybento Apr 6, 2026
35f216a
Update Russian
tastybento Apr 7, 2026
2e5aaef
Fix bold (and other decorations) leaking across legacy round-trip
tastybento Apr 7, 2026
050e630
Merge pull request #2918 from BentoBoxWorld/fix/2917-bold-leak-legacy…
tastybento Apr 7, 2026
1085143
Add round-trip leak test for italic, underlined, strikethrough, obfus…
tastybento Apr 7, 2026
b8a93ed
Merge pull request #2920 from BentoBoxWorld/test/2917-decoration-leak…
tastybento Apr 7, 2026
315b8f8
Document MiniMessage/legacy round-trip pitfall in CLAUDE.md
tastybento Apr 7, 2026
173a7b2
Initial plan
Copilot Apr 7, 2026
b9d687f
Update Russian text
tastybento Apr 7, 2026
854d615
Merge pull request #2925 from BentoBoxWorld/tastybento-patch-1
tastybento Apr 7, 2026
cef0e60
Add HIDE_ADDITIONAL_TOOLTIP ItemFlag to PanelItem to hide banner patt…
Copilot Apr 7, 2026
060bec7
Initial plan
Copilot Apr 7, 2026
43d3200
Defer island saves while settings panel is open and apply click cooldown
Copilot Apr 7, 2026
532e215
Fix #2919: extra blank line in confirmation conversation prompts
tastybento Apr 8, 2026
eb37380
Merge pull request #2926 from BentoBoxWorld/copilot/add-cooldown-to-s…
tastybento Apr 8, 2026
7bc6b73
Merge pull request #2927 from BentoBoxWorld/fix/2919-prompt-blank-line
tastybento Apr 8, 2026
7c0e6a9
Replace deprecated HIDE_ADDITIONAL_TOOLTIP with modern TooltipDisplay…
Copilot Apr 8, 2026
ba74caa
Merge branch 'develop' into copilot/add-option-to-disable-attributes
tastybento Apr 8, 2026
cad30ec
Merge pull request #2924 from BentoBoxWorld/copilot/add-option-to-dis…
tastybento Apr 8, 2026
db27587
Skip locale files with invalid BCP-47 tags
tastybento Apr 8, 2026
7f8ca73
Merge pull request #2928 from BentoBoxWorld/fix/blank-locale-panel-entry
tastybento Apr 8, 2026
5266c6c
Update src/main/java/world/bentobox/bentobox/Settings.java
tastybento Apr 8, 2026
2182fdc
Update obsidian scooping lava tip duration version and enhance compon…
tastybento Apr 8, 2026
7cbc0b6
Merge remote-tracking branch 'origin/develop' into develop
tastybento Apr 8, 2026
570498e
Fix ChunkPregenManagerTest after pregenEnabled default flipped to false
tastybento Apr 8, 2026
a44b605
Add callback support for spawned MythicMobs in MythicMobsHook
tastybento Apr 8, 2026
e24ddee
Make MythicMobsHook.spawnMythicMob delay configurable
tastybento Apr 8, 2026
5e19194
Merge pull request #2929 from BentoBoxWorld/feature/mythicmob-configu…
tastybento Apr 8, 2026
c2a48c2
Preserve addon-owned placeholders across /bbox reload (#2930)
tastybento Apr 9, 2026
4741603
Merge pull request #2931 from BentoBoxWorld/fix/2930-placeholder-reload
tastybento Apr 9, 2026
ce9b170
Don't clear gamemode addon placeholders on reload
tastybento Apr 9, 2026
40d611d
Merge pull request #2932 from BentoBoxWorld/fix/2930-placeholder-relo…
tastybento Apr 9, 2026
f0ec806
Preserve mid-text spaces in legacy/MiniMessage round-trip
tastybento Apr 9, 2026
c25e165
Support MiniMessage in welcome sign locale entries
tastybento Apr 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ The main plugin class is `BentoBox.java` (extends `JavaPlugin`). Almost all subs
### Key Packages

- **`api/`** — Public API surface for addons: events, commands, panels (GUIs), user management, flags, configuration
- **`managers/`** — Core subsystems: `IslandsManager`, `PlayersManager`, `AddonsManager`, `LocalesManager`, `FlagsManager`, `BlueprintsManager`, `HooksManager`, `PlaceholdersManager`, `RanksManager`
- **`database/`** — Database abstraction supporting MongoDB, MySQL, MariaDB, and PostgreSQL (via HikariCP)
- **`managers/`** — Core subsystems: `IslandsManager`, `PlayersManager`, `AddonsManager`, `LocalesManager`, `FlagsManager`, `BlueprintsManager`, `BlueprintClipboardManager`, `HooksManager`, `PlaceholdersManager`, `RanksManager`, `CommandsManager`, `IslandDeletionManager`, `IslandChunkDeletionManager`, `MapManager`, `WebManager`
- **`database/`** — Database abstraction supporting MongoDB, MySQL, MariaDB, PostgreSQL (via HikariCP), and SQLite
- **`blueprints/`** — Island schematic handling and pasting
- **`listeners/`** — Bukkit event handlers (teleport, death, join/leave, panel clicks, spawn protection)
- **`commands/`** — Admin and user command implementations
- **`panels/`** — Inventory GUI panel system
- **`hooks/`** — Integrations with external plugins (Vault, PlaceholderAPI, MythicMobs, Multiverse, LuckPerms, etc.)
- **`hooks/`** — Integrations with external plugins (Vault, PlaceholderAPI, MythicMobs, Multiverse, LuckPerms, ItemsAdder, Slimefun, Oraxen, ZNPCsPlus, FancyNpcs, BlueMap, Dynmap, LangUtils, etc.)
- **`nms/`** — NMS (Native Minecraft Server) version-specific code

### Island Data Flow
Expand Down Expand Up @@ -118,9 +118,17 @@ public ImmutableSet<UUID> getMemberSet() { ... }

Guava (`ImmutableSet`, `ImmutableList`, etc.) is reliably available at runtime via Paper's bundled JARs and is safe to use in the public API.

## MiniMessage / legacy color round-trip

`User.getTranslation()` returns a legacy `§`-coded string for backwards compatibility, even when the locale entry is MiniMessage. UI code (`PanelItem.setDescription`, etc.) then re-parses that legacy string back into a Component via `Util.parseMiniMessageOrLegacy`. This MiniMessage → Component → legacy → Component round-trip is lossy by default because of an Adventure quirk:

**Adventure's `LegacyComponentSerializer` never emits `§r` to turn off a decoration when a sibling component clears it.** Legacy color codes have no "decoration off" code — only `§r` resets — but Adventure simply omits the decoration code on the next sibling instead of resetting. When that legacy string is re-parsed under correct legacy semantics (decorations persist until `§r`), the decoration leaks into the following segment. This bit bold, italic, underlined, strikethrough, and obfuscated equally (#2917).

`Util.componentToLegacy` is therefore **not** a thin wrapper around Adventure's serializer — it's a custom Component walker (`appendComponentLegacy` / `emitStyleTransition`) that tracks the last-emitted color and decorations and inserts `§r` whenever any decoration was on and is now off, then re-applies color afterwards. **Do not replace it with `LegacyComponentSerializer.serialize()` directly** without re-introducing the leak. The round-trip is exercised by `LegacyToMiniMessageTest`.

## Build Notes

- The Gradle build uses the Paper `userdev` plugin and Shadow plugin to produce a fat/shaded JAR at `build/libs/BentoBox-{version}.jar`.
- `plugin.yml` and `config.yml` are filtered for the `${version}` placeholder at build time; locale files are copied without filtering.
- Java preview features are enabled for both compilation and test execution.
- Local builds produce version `3.11.2-LOCAL-SNAPSHOT`; CI builds append `-b{BUILD_NUMBER}-SNAPSHOT`; `origin/master` builds produce the bare version.
- Local builds produce version `3.13.0-LOCAL-SNAPSHOT`; CI builds append `-b{BUILD_NUMBER}-SNAPSHOT`; `origin/master` builds produce the bare version.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArt
group = "world.bentobox" // From <groupId>

// Base properties from <properties>
val buildVersion = "3.13.0"
val buildVersion = "3.14.0"
val buildNumberDefault = "-LOCAL" // Local build identifier
val snapshotSuffix = "-SNAPSHOT" // Indicates development/snapshot version

Expand Down
15 changes: 14 additions & 1 deletion src/main/java/world/bentobox/bentobox/BentoBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import world.bentobox.bentobox.managers.CommandsManager;
import world.bentobox.bentobox.managers.FlagsManager;
import world.bentobox.bentobox.managers.HooksManager;
import world.bentobox.bentobox.managers.ChunkPregenManager;
import world.bentobox.bentobox.managers.IslandDeletionManager;
import world.bentobox.bentobox.managers.IslandWorldManager;
import world.bentobox.bentobox.managers.IslandsManager;
Expand Down Expand Up @@ -70,6 +71,7 @@ public class BentoBox extends JavaPlugin implements Listener {
private PlaceholdersManager placeholdersManager;
private MapManager mapManager;
private IslandDeletionManager islandDeletionManager;
private ChunkPregenManager chunkPregenManager;
private WebManager webManager;

// Settings
Expand Down Expand Up @@ -283,6 +285,7 @@ private void registerListeners() {
BentoBoxListenerRegistrar registrar = new BentoBoxListenerRegistrar(this);
registrar.register();
islandDeletionManager = registrar.getIslandDeletionManager();
chunkPregenManager = registrar.getChunkPregenManager();
}

@Override
Expand All @@ -302,7 +305,9 @@ public void onDisable() {
if (islandsManager != null) {
islandsManager.shutdown();
}

if (chunkPregenManager != null) {
chunkPregenManager.shutdown();
}

}

Expand Down Expand Up @@ -553,6 +558,14 @@ public IslandDeletionManager getIslandDeletionManager() {
return islandDeletionManager;
}

/**
* @return the chunkPregenManager
* @since 3.14.0
*/
public ChunkPregenManager getChunkPregenManager() {
return chunkPregenManager;
}

/**
* @return an optional of the Bstats instance
* @since 1.1
Expand Down
119 changes: 119 additions & 0 deletions src/main/java/world/bentobox/bentobox/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,32 @@ public class Settings implements ConfigObject {
@ConfigEntry(path = "island.deletion.slow-deletion", since = "1.19.1")
private boolean slowDeletion = false;

// Chunk pre-generation settings
@ConfigComment("")
@ConfigComment("Chunk pre-generation settings.")
@ConfigComment("Pre-generates chunks around predicted future island locations")
@ConfigComment("to reduce lag when islands are created or reset.")
@ConfigComment("")
@ConfigComment("Enable or disable chunk pre-generation.")
@ConfigEntry(path = "island.pregeneration.enabled", since = "3.14.0")
private boolean pregenEnabled = false;

@ConfigComment("Number of future islands to pre-generate chunks for, per game mode world.")
@ConfigComment("Higher values use more disk space but reduce the chance of lag on island creation.")
@ConfigEntry(path = "island.pregeneration.islands-ahead", since = "3.14.0")
private int pregenIslandsAhead = 3;

@ConfigComment("Maximum number of async chunk generation requests dispatched per tick batch.")
@ConfigComment("Lower values reduce server impact. Paper handles these asynchronously.")
@ConfigComment("Recommended range: 2-10.")
@ConfigEntry(path = "island.pregeneration.chunks-per-tick", since = "3.14.0")
private int pregenChunksPerTick = 4;

@ConfigComment("Ticks between pre-generation batches.")
@ConfigComment("1 = every tick (fastest), 20 = once per second (gentlest).")
@ConfigEntry(path = "island.pregeneration.tick-interval", since = "3.14.0")
private int pregenTickInterval = 5;

@ConfigComment("By default, If the destination is not safe, the plugin will try to search for a safe spot around the destination,")
@ConfigComment("then it will try to expand the y-coordinate up and down from the destination.")
@ConfigComment("This setting limits how far the y-coordinate will be expanded.")
Expand Down Expand Up @@ -376,6 +402,13 @@ public class Settings implements ConfigObject {
@ConfigEntry(path = "island.obsidian-scooping-cooldown", since = "3.11.4")
private int obsidianScoopingCooldown = 1;

@ConfigComment("How long (in seconds) to show a hologram tip above newly formed obsidian")
@ConfigComment("that can be scooped back into lava. The hologram reminds players they can")
@ConfigComment("right-click obsidian with an empty bucket to recover lava.")
@ConfigComment("Set to 0 or less to disable the tip entirely. Default is 5 seconds.")
@ConfigEntry(path = "island.obsidian-scooping-lava-tip-duration", since = "3.14.0")
private int obsidianScoopingLavaTipDuration = 5;

/* WEB */
@ConfigComment("Toggle whether BentoBox can connect to GitHub to get data about updates and addons.")
@ConfigComment("Disabling this will result in the deactivation of the update checker and of some other")
Expand Down Expand Up @@ -995,6 +1028,70 @@ public void setSlowDeletion(boolean slowDeletion) {
this.slowDeletion = slowDeletion;
}

/**
* @return whether chunk pre-generation is enabled
* @since 3.14.0
*/
public boolean isPregenEnabled() {
return pregenEnabled;
}

/**
* @param pregenEnabled whether chunk pre-generation is enabled
* @since 3.14.0
*/
public void setPregenEnabled(boolean pregenEnabled) {
this.pregenEnabled = pregenEnabled;
}

/**
* @return number of future islands to pre-generate per game mode
* @since 3.14.0
*/
public int getPregenIslandsAhead() {
return pregenIslandsAhead;
}

/**
* @param pregenIslandsAhead number of future islands to pre-generate
* @since 3.14.0
*/
public void setPregenIslandsAhead(int pregenIslandsAhead) {
this.pregenIslandsAhead = pregenIslandsAhead;
}

/**
* @return max async chunk generation requests per tick batch
* @since 3.14.0
*/
public int getPregenChunksPerTick() {
return pregenChunksPerTick;
}

/**
* @param pregenChunksPerTick max async chunk requests per tick
* @since 3.14.0
*/
public void setPregenChunksPerTick(int pregenChunksPerTick) {
this.pregenChunksPerTick = pregenChunksPerTick;
}

/**
* @return ticks between pre-generation batches
* @since 3.14.0
*/
public int getPregenTickInterval() {
return pregenTickInterval;
}

/**
* @param pregenTickInterval ticks between batches
* @since 3.14.0
*/
public void setPregenTickInterval(int pregenTickInterval) {
this.pregenTickInterval = pregenTickInterval;
}

/**
* Gets maximum pool size.
*
Expand Down Expand Up @@ -1153,6 +1250,28 @@ public void setObsidianScoopingCooldown(int obsidianScoopingCooldown) {
this.obsidianScoopingCooldown = Math.max(1, obsidianScoopingCooldown);
}

/**
* Gets the duration (in seconds) for showing the lava tip hologram above
* newly formed obsidian blocks that can be scooped.
*
* @return the lava tip duration in seconds; 0 or less means disabled
* @since 3.14.0
*/
public int getObsidianScoopingLavaTipDuration() {
return obsidianScoopingLavaTipDuration;
}

/**
* Sets the duration (in seconds) for showing the lava tip hologram above
* newly formed obsidian blocks that can be scooped.
*
* @param obsidianScoopingLavaTipDuration the duration in seconds; 0 or less disables
* @since 3.14.0
*/
public void setObsidianScoopingLavaTipDuration(int obsidianScoopingLavaTipDuration) {
this.obsidianScoopingLavaTipDuration = obsidianScoopingLavaTipDuration;
}

/**
* @return the islandNumber
* @since 2.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,21 @@ public boolean isFixIslandCenter() {
public boolean isEnforceEqualRanges() {
return true;
}

/**
* Returns the number of islands to pre-generate chunks for in this game mode.
* <p>
* Override this method to customize pre-generation for your addon:
* <ul>
* <li>{@code -1} — use the global BentoBox setting (default)</li>
* <li>{@code 0} — disable pre-generation for this addon</li>
* <li>positive value — pre-generate this many islands ahead</li>
* </ul>
*
* @return number of islands ahead, -1 for global default, 0 to disable
* @since 3.14.0
*/
public int getPregenIslandsAhead() {
return -1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.database.objects.Island;
import world.bentobox.bentobox.managers.RanksManager;
import world.bentobox.bentobox.panels.settings.IslandDefaultSettingsTab;
import world.bentobox.bentobox.panels.settings.SettingsTab;
import world.bentobox.bentobox.panels.settings.WorldDefaultSettingsTab;
import world.bentobox.bentobox.util.Util;
Expand Down Expand Up @@ -224,6 +225,7 @@ public boolean execute(User user, String label, List<String> args) {
.world(getWorld())
.tab(1, new SettingsTab(getWorld(), user, Flag.Type.WORLD_SETTING, Flag.Mode.EXPERT))
.tab(2, new WorldDefaultSettingsTab(getWorld(), user))
.tab(3, new IslandDefaultSettingsTab(getWorld(), user))
.startingSlot(1)
.size(54)
.build().openPanel();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,17 @@ public boolean execute(User user, String label, List<String> args)
return false;
}

FilenameFilter blueprintFilter = (File dir, String name) -> name.endsWith(BlueprintsManager.BLUEPRINT_SUFFIX);
FilenameFilter blueprintFilter = (File dir, String name) ->
name.endsWith(BlueprintsManager.BLUEPRINT_SUFFIX) || name.endsWith(BlueprintsManager.LEGACY_BLUEPRINT_SUFFIX);

List<String> blueprintList = Arrays.stream(Objects.requireNonNull(blueprints.list(blueprintFilter))).
map(name -> name.substring(0, name.length() - BlueprintsManager.BLUEPRINT_SUFFIX.length())).
map(name -> {
if (name.endsWith(BlueprintsManager.BLUEPRINT_SUFFIX)) {
return name.substring(0, name.length() - BlueprintsManager.BLUEPRINT_SUFFIX.length());
}
return name.substring(0, name.length() - BlueprintsManager.LEGACY_BLUEPRINT_SUFFIX.length());
}).
distinct().
toList();

if (blueprintList.isEmpty())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
public class AdminBlueprintLoadCommand extends CompositeCommand {

private static final FilenameFilter BLUEPRINT_FILTER = (File dir, String name) -> name
.endsWith(BlueprintsManager.BLUEPRINT_SUFFIX);
.endsWith(BlueprintsManager.BLUEPRINT_SUFFIX) || name.endsWith(BlueprintsManager.LEGACY_BLUEPRINT_SUFFIX);

public AdminBlueprintLoadCommand(AdminBlueprintCommand parent) {
super(parent, "load");
Expand Down Expand Up @@ -54,11 +54,22 @@ public Optional<List<String>> tabComplete(User user, String alias, List<String>
AdminBlueprintCommand parent = (AdminBlueprintCommand) getParent();
File folder = parent.getBlueprintsFolder();
if (folder.exists()) {
options = Arrays.stream(Objects.requireNonNull(folder.list(BLUEPRINT_FILTER))).map(n -> n.substring(0, n.length() - 4)) // remove .blu from filename
options = Arrays.stream(Objects.requireNonNull(folder.list(BLUEPRINT_FILTER)))
.map(AdminBlueprintLoadCommand::removeBlueprintSuffix)
.toList();
}
String lastArg = !args.isEmpty() ? args.getLast() : "";

return Optional.of(Util.tabLimit(options, lastArg));
}

private static String removeBlueprintSuffix(String name) {
if (name.endsWith(BlueprintsManager.BLUEPRINT_SUFFIX)) {
return name.substring(0, name.length() - BlueprintsManager.BLUEPRINT_SUFFIX.length());
}
if (name.endsWith(BlueprintsManager.LEGACY_BLUEPRINT_SUFFIX)) {
return name.substring(0, name.length() - BlueprintsManager.LEGACY_BLUEPRINT_SUFFIX.length());
}
return name;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ public boolean canExecute(User user, String label, List<String> args)
// Check if the 'from' file exists
AdminBlueprintCommand parent = (AdminBlueprintCommand) this.getParent();
File fromFile = new File(parent.getBlueprintsFolder(), from + BlueprintsManager.BLUEPRINT_SUFFIX);
File fromFileLegacy = new File(parent.getBlueprintsFolder(), from + BlueprintsManager.LEGACY_BLUEPRINT_SUFFIX);

if (!fromFile.exists())
if (!fromFile.exists() && !fromFileLegacy.exists())
{
user.sendMessage("commands.admin.blueprint.no-such-file");
return false;
Expand All @@ -78,8 +79,9 @@ public boolean execute(User user, String label, List<String> args)

// Check if the 'to' file exists
File toFile = new File(parent.getBlueprintsFolder(), to + BlueprintsManager.BLUEPRINT_SUFFIX);
File toFileLegacy = new File(parent.getBlueprintsFolder(), to + BlueprintsManager.LEGACY_BLUEPRINT_SUFFIX);

if (toFile.exists())
if (toFile.exists() || toFileLegacy.exists())
{
// Ask for confirmation to overwrite
this.askConfirmation(user,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ public boolean execute(User user, String label, List<String> args)

// Check if file exists
File newFile = new File(parent.getBlueprintsFolder(), fileName + BlueprintsManager.BLUEPRINT_SUFFIX);
File legacyFile = new File(parent.getBlueprintsFolder(), fileName + BlueprintsManager.LEGACY_BLUEPRINT_SUFFIX);

if (newFile.exists())
if (newFile.exists() || legacyFile.exists())
{
this.askConfirmation(user,
user.getTranslation("commands.admin.blueprint.file-exists"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ public NamePrompt(BentoBox plugin, @NonNull Island island, @NonNull User user, S
@Override
@NonNull
public String getPromptText(@NonNull ConversationContext context) {
// Send via User to properly render MiniMessage/legacy formatting,
// since Bukkit's conversation API sends raw text without formatting.
user.sendRawMessage(user.getTranslation("commands.island.renamehome.enter-new-name"));
return "";
return user.getTranslation("commands.island.renamehome.enter-new-name");
}

@Override
Expand Down
Loading
Loading