Skip to content
Merged
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ public boolean execute(User user, String label, List<String> args) {
if (args.isEmpty()) {
this.askConfirmation(user, user.getTranslation("commands.bentobox.reload.warning"), () -> {

// Clear placeholders that this reload will rebuild. Addon-owned
// placeholders (e.g. from the Level addon) are intentionally
// preserved because reload does not re-invoke addons (#2930).
// Clear only BentoBox-core placeholders. Addon-owned placeholders
// (both gamemode defaults and any custom ones addons register
// themselves) are intentionally preserved because reload does
// not re-invoke addons (#2930). registerDefaultPlaceholders
// below is idempotent, so any newly-added flag placeholders
// will still be picked up.
PlaceholdersManager pm = getPlugin().getPlaceholdersManager();
pm.unregisterAll();
getPlugin().getAddonsManager().getGameModeAddons().forEach(pm::unregisterAll);

// Close all open panels
PanelListenerManager.closeAllPanels();
Expand Down
Loading