MobArena icon indicating copy to clipboard operation
MobArena copied to clipboard

Add configuration option for monster to glow after specified delay time.

Open OreoKirby opened this issue 4 years ago • 0 comments

Summary

  • This is a…
    • [ ] Bug fix
    • [X] Feature addition
    • [ ] Documentation
    • [ ] Refactoring
    • [ ] Minor / simple change (like a typo)
    • [ ] Other
  • Adds a new per-arena setting monster-glow-delay that adds a glow effect to mobs after a set time.

Problem

Depending on the map design and how a configuration file is set up, often players can find themselves spending a long time searching for mobs in larger arenas. Some map makers do not want to sacrifice the layout of the arena entirely for the sake of pathing or are always able to remedy monsters getting stuck on certain obstacles. When monsters are spawned in arenas like this, sometimes they can be very difficult to locate.

  • See for https://github.com/garbagemule/MobArena/issues/629 for details.

Solution

Added a HashMap waveMonsters to store monsters and ties them to the wave in which they were spawned. A BukkitRunnable runnable is created to run after the seconds defined in the monsterGlowDelay variable. This will apply a GLOWING potion effect using PotionEffectParserto any monster that is still alive from the wave for which the runnable task is called for. This method allows future use of modifying monsters on a per-wave basis and not every current living monster.

Action

This commit adds a new per-arena setting monster-glow-delay that can be used to give monsters a glowing effect after a specified time.

OreoKirby avatar Jan 24 '22 03:01 OreoKirby