Skip to content

Support Cooldowns for Custom Boosts #6

@ez-plugins

Description

@ez-plugins

Summary

Currently, the CustomBoostEffect interface does not provide a way for custom boost effects to specify or expose cooldown durations. This limits the ability of plugins and administrators to control the frequency with which custom boosts can be activated, potentially leading to balance issues.

Proposed Solution

Extend the CustomBoostEffect interface to include a cooldown method:

  • Add a default method getCooldownSeconds() that returns the cooldown duration in seconds (defaulting to 0 for no cooldown).
  • This allows each custom boost effect to define its own cooldown period in a backward-compatible way.

Example:

public interface CustomBoostEffect {
    void apply(Player player, int amplifier);
    void remove(Player player);
    String getName();

    /**
     * @return cooldown duration in seconds (default 0 = no cooldown)
     */
    default int getCooldownSeconds() {
        return 0;
    }
}

Benefits

  • Enables per-effect cooldown configuration for custom boosts.
  • Improves balance and flexibility for plugin developers and server administrators.
  • Maintains backward compatibility with existing implementations.

Additional Suggestions

  • Update BoostManager to track and enforce cooldowns per player and effect.
  • Optionally, expose cooldown status via the API for integration with UIs or other plugins.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions