This framework consists of interfaces and classes for managing various
kinds of timers. The Timer interface models a timer with configurable
tick intervals. The TimerCallback interface provides a means of adding
logic to the following timer events: onStart, onStop, onFinish and
onTick.
Timer implementations include a CountdownTimer (kitchen timer), and a
StopwatchTimer, which should both be self-explanatory.
The purpose of this framework is to add a means of creating a very
generalized approach to timers, in hopes of abstracting away some of
the Bukkit scheduling for easy maintenance and increased portability.
Future work:
- Port auto-start-timer
- Port boss abilities
- Port spawner
- Create 'delay-timer' as per DBO ticket request.
- Create various types of cooldowns, delays, etc.
When the WaveManager is queried for the next wave to be spawned via
the next() method, it now returns a copy of the wave instead of the
wave itself. This is because waves (boss waves in particular) have
state, and this state is transferred to the next occurrence of the
given wave. This caused recurrent boss waves to inconsistently share
state, which resulted in the BossAbilityThread bailing early after
the first occurrence of the boss wave it belonged to. By copying
the initial wave state in the WaveManager, the issue is fixed.
Fixes: http://dev.bukkit.org/bukkit-plugins/mobarena/tickets/1220/
This is necessary to ensure a robust /ma spec command. If no spectator
warp is set, the command will throw an NPE - it is much more safe and
sane to require the warp.
The items-node in the classes section now supports list values instead
of strictly string-values. This should make it easier to see exactly
which items a class has, and it should alleviate some of the problems
associated with apostrophes and such. The string-valued setup is still
supported to preserve some backwards compatibility.
The armor-node remains untouched, but it will probably be updated to
the same system later.
The notion of a "selected arena" disappears with this commit. All
commands that previously did not require an arena name in the case
of multiple arenas now do, i.e. it is no longer possible to "set"
an arena to be the target of commands. This should not be an issue,
however, since Setup Mode replaces all the commands that previously
were the main reason for the notion of a selected arena.