Commit Graph

780 Commits

Author SHA1 Message Date
garbagemule
7d14b1b10a Implement start-delay-timer.
The StartDelayTimer wraps the AutoStartTimer and provides a means of
"locking" the lobby until a configurable time has passed. During this
time, it is possible for other players to join the lobby and ready up,
but the arena will not start until the StartDelayTimer has run out,
after which the AutoStartTimer is started (if applicable).

New per-arena setting: start-delay-timer: [seconds]
New announcement: arena-start-delay
2014-02-25 04:36:35 +01:00
garbagemule
5e83c4e7e9 Use correct announcement in AutoStartTimer. 2014-02-25 04:33:43 +01:00
garbagemule
4299353ded Get rid of unnecessary inner classes in AutoStartTimer. 2014-02-25 04:21:58 +01:00
garbagemule
066341ba30 Replace the old AutoStartTimer with the new one. 2014-02-25 03:41:32 +01:00
garbagemule
00060ad5a4 Add new AutoStartTimer using timer framework.
This commit only adds the new timer, but doesn't put it into use.
2014-02-25 03:34:35 +01:00
garbagemule
67535eed93 Null internal timer in CountdownTimer on finish. 2014-02-25 03:32:44 +01:00
garbagemule
bf8c244fce Add utility class for timer package. 2014-02-25 02:11:43 +01:00
garbagemule
937faea5e0 Add setDuration(long) method to CountdownTimer.
The purpose of this method is to allow initialization of the duration
post-construction for convenience.
2014-02-25 02:05:49 +01:00
garbagemule
f8460d5030 Add documentation to TimerCallback 2014-02-25 01:21:26 +01:00
garbagemule
a95ab27d5e Add Timer framework.
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.
2014-02-25 01:09:03 +01:00
garbagemule
f85f9e20d7 Add copy() method to Wave interface.
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/
2014-02-24 17:22:20 +01:00
garbagemule
92c4ce1a8b Fix per-arena protect flag. 2014-02-11 17:27:37 +01:00
garbagemule
ea497e42c2 Fix typo in join-arena-is-running announcement. 2014-02-10 01:10:38 +01:00
garbagemule
a527c4a842 Remove obsolete item storing for RepairableContainer. 2014-02-06 04:41:21 +01:00
garbagemule
96870e826b Fix NPE in upgrade map parsing. 2014-02-06 01:07:29 +01:00
garbagemule
7b51fb678c Add command for picking classes in the lobby. 2014-02-02 00:49:59 +01:00
garbagemule
e02f437c2a Fix per-wave spawnpoints-node. 2014-01-27 23:36:48 +01:00
garbagemule
fd7a9c0d0b Empty announcements should be the empty string, not a space. 2014-01-25 15:51:42 +01:00
garbagemule
3223de641f Add setclassprice command. 2014-01-25 15:43:55 +01:00
garbagemule
d0bb31b53d Fix item parser economy regex. 2014-01-25 15:43:16 +01:00
garbagemule
619f07f11b Add per-class option 'price'. 2014-01-25 15:42:38 +01:00
garbagemule
97e5dd0b63 Fix NPE on missing, but expected, monster maps. 2014-01-25 13:56:31 +01:00
garbagemule
d866ec50af Fix checkdata command. 2014-01-23 20:24:11 +01:00
garbagemule
2d3ba801d5 Bring version checker back up to par. 2014-01-22 15:34:48 +01:00
garbagemule
88340beaf6 Remove obsolete language files. 2014-01-22 14:53:23 +01:00
garbagemule
b87cdb7f8a Add notready permission node. Fixes #221 2014-01-22 14:23:12 +01:00
garbagemule
cf41a6add2 Add per-arena setting: show-death-messages 2014-01-22 13:59:17 +01:00
garbagemule
9b161cb1c2 Simplify Setup Mode listener unregistration. 2014-01-22 13:49:39 +01:00
garbagemule
18d4171234 Update plugin.yml towards next release. 2014-01-22 00:04:40 +01:00
garbagemule
e1f7c58e24 Version 0.96.2 2014-01-22 00:04:07 +01:00
garbagemule
9c4c42bc81 Use Curse/Bukkit API for version checking. 2014-01-22 00:03:44 +01:00
garbagemule
7bfe77e9ba Update plugin.yml towards next release. 2014-01-20 03:02:04 +01:00
garbagemule
6d93dfa660 Fix entry-fee issue. 2014-01-20 02:59:03 +01:00
garbagemule
c536f3d47e Update plugin.yml towards next release. 2014-01-19 23:42:58 +01:00
garbagemule
ff1957cb17 Version 0.96 2014-01-19 23:42:27 +01:00
garbagemule
b14f665af0 Fix incorrect parsing of final-wave. 2013-12-17 03:55:14 +01:00
garbagemule
5ff41d20fe Use Material instead of item ID. 2013-11-28 02:12:51 +01:00
garbagemule
7d01d613be Fix entry fee issue. 2013-11-28 02:10:57 +01:00
garbagemule
93798a3e51 Remove health strategies. 2013-10-19 16:40:29 +02:00
garbagemule
41e910ad69 More help on arena-not-found with setup command. 2013-10-18 21:16:42 +02:00
garbagemule
3763b877aa Clear spectator drops on death. Fixes #210 2013-10-16 11:37:12 +02:00
garbagemule
bf30185534 Add horse variants as monster types. 2013-10-07 11:55:50 +02:00
garbagemule
56a616ee76 Implement mounts. 2013-10-07 02:05:59 +02:00
garbagemule
24caeab24f Health updates for 1.6 2013-10-07 00:35:47 +02:00
garbagemule
5b2b64d8de Revert "Rip in peace, Metrics, you magnificent bastard."
This reverts commit 096c4d4367.
2013-09-26 13:29:33 +02:00
garbagemule
451e39e3b7 Make spec warp mandatory.
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.
2013-09-21 15:27:41 +02:00
garbagemule
096c4d4367 Rip in peace, Metrics, you magnificent bastard. 2013-09-20 23:27:46 +02:00
garbagemule
42d656863f Attempt to fix auto-start-timer issues. 2013-09-20 23:25:38 +02:00
garbagemule
349172b3b6 Make showBlock(s) thread-safe. 2013-09-09 09:05:54 +02:00
garbagemule
acd441dd2e Try to fix flight exception with Setup Mode. 2013-09-09 09:04:52 +02:00