Apollo
Developers
Modules
Colored Fire

Colored Fire Module

Overview

The colored fire module allows you to modify the color of the flames that appear on a burning entity.

Colored Fire Module Example

Make users burn with any color!

Integration

Sample Code

public void overrideColoredFireExample(UUID burningPlayer) {
    this.coloredFireModule.overrideColoredFire(Recipients.ofEveryone(),
        burningPlayer,
        Color.BLUE
    );
}

overrideColoredFire Parameters

  1. Recipients recipients
    • A list of all the player(s) you want to be able to see the updated fire color.
  2. UUID target
    • The player or living entity you want to display the updated fire color on.
  3. Color flameColor
    • How you'll dictate the color of the fire, see the colors page for more.

Removing a specific targets colored fire for viewers

public void resetColoredFireExample(UUID burningPlayer) {
    this.coloredFireModule.resetColoredFire(Recipients.ofEveryone(), burningPlayer);
}

Resetting all colored fires for all viewers

public void resetColoredFiresExample(Player viewer) {
    Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());
    apolloPlayerOpt.ifPresent(this.coloredFireModule::resetColoredFires);
}