Power ups - SpleefX/SpleefX GitHub Wiki

Power-ups are buffs (or de-buffs) that appear randomly inside an arena with a fixed interval.

Power-ups may give the player an advantage (for example, invisibility), a disadvantage (such as nausea), a random effect, or perform certain actions that may benefit or harm the player, such as switching positions with another player.

Power-ups

Note that power-ups require Holographic Displays, otherwise they will not work.

Setting up power-ups for an arena

To add power-ups to an arena, follow the steps below:

  1. Go to the center of the arena
  2. Run the following command:

/<mode> arena powerupscenter <arena>

Example: /spleef arena powerupscenter test

  1. Run /<mode> arena settings <arena> and configure the spawning radius for the arena

Settings UI

  1. Configure the arena power-ups in /<mode> powerups <arena>:

Powerups GUI

Done! Power-ups should now spawn in your arena.

Configure power-ups

Each power-up has its own file in /SpleefX/power-ups/.

power-ups folder

I want to clone a power-up but with different settings!

We got you! You can clone any power-up as long as you maintain the PowerupType property. Simply clone the power-up file, change the name of the power-up and then customize it freely.

The interval of spawning power-ups

  1. Go to config.yml
  2. Scroll down to the Powerups section and edit the SpawnEvery option.

SpawnEvery option

Power-ups template

All power-ups share certain properties. Each power-up has a type, which includes additional properties to configure the type.

Field Type Required Description Notes
PowerupType String ✔️ The power-up type In cases of implementing customized power-ups through the developer API, this should be the canonical name of the implementation class.
Name String ✔️ The unique name / identifier of the power-up This should only contain alphanumeric characters, underscores, or dashes. Whitespace is not allowed.
Timeout Integer ✔️ How much should the power-up last in the arena, before disappearing. Measured in seconds
ActivationSound Sound The sound to play when the power-up is taken See list of values
PowerupIcon Item ✔️ The displayed item when the power-up spawns
DisplayText String ✔️ The hologram text that is displayed above the power-up icon Acceps color codes with &
BlinkAt Integer ✔️ The second in which the hologram should start blinking (implying that it is about to disappear) Measured in seconds
TextOnPick String Text to send to the player when they activate a power-up

Power-up types

Each type defines a few additional properties beside the common ones above

BlockTrailPowerup

Description: Leaves a block trail wherever the player walks

Field Type Required Description Notes
BlockTrail Material type string ✔️ The block type to leave trail of. Must be a block! (Bread, for example, will not work)
Duration Integer ✔️ How much should the trail last for Measured in seconds

FlashBangPowerup

Description: Displays a large explosion cloud that blocks vision.

  • No additional properties

NearbyPotionEffectPowerup

Description: Gives effect(s) to all players in a given radius

Field Type Required Description
Potions List of potions ✔️ A list of potions to give
Radius Decimal ✔️ The radius to give effect for

PlayerEffectPowerup

Description: Gives effect(s) to the player that took the power-up

Field Type Required Description
Potions List of potions ✔️ A list of potions to give

RandomPlayerEffectPowerup

Description: Gives effect(s) to a random player in the match

Field Type Required Description
Potions List of potions ✔️ A list of potions to give
ExcludePicker Boolean ✔️ Should the picker be excluded from getting the effect

RandomPowerup

Description: Activates a random power-up

  • No additional properties

SnowballBlockChangePowerup

Description: Gives special projectiles (eggs / snowballs) to the taker, in which these projectiles change the type of blocks where they land in

Field Type Required Description
SnowballItem Item ✔️ The projectile item to give
Radius Integer ✔️ The radius of blocks to be changed
Replaced List of materials ✔️ The list of materials to change
ReplaceWith Material ✔️ The new material to replace.

SplashPotionPowerup

Description: Gives the taker a splash potion that contains a set amount of potion effects.

Field Type Required Description
Potions List of potions ✔️ A list of potions to give

SwitchPositionPowerup

Description: Switches the positions between the taker and a random player.

Field Required Description Notes
SwitchMessage Message to send to the player that takes the power-up Accepts {player} as a placeholder for the target player name

Creating custom power-ups

To create a power-up that is based on one of the above power-up types, do the following:

  • Copy a power-up that has the same PowerupType as the desired type, and rename the file.
  • Edit the power-up properties to your likings
  • Reload with /spleefx reload, or restart your server.
⚠️ **GitHub.com Fallback** ⚠️