Skip to content

Flight 1.5.0

Compare
Choose a tag to compare
@devoxin devoxin released this 30 Dec 22:46
· 68 commits to master since this release

Added

  • CommandClient#waitFor<T: Event>(predicate, timeout)
    • This makes use of the reified keyword so you can do things like client.waitFor<MessageReceivedEvent>({ true }, 3000)
  • FlightInfo.GIT_REVISION
    • This allows you to pinpoint which specific commit of Flight you're working with.

Removed

  • AwaitTimeoutException
    • Figured this didn't have any specific purpose when a TimeoutException already existed.

Changes

  • CommandClient now uses EventListener instead of extending ListenerAdapter.
    • This means that Flight will only process events it needs to, which should offer slightly better performance.
    • This also has the added benefit of allowing internal hooks such as onMessageReceived to be private. Nothing exciting but should yield a less cluttered auto-complete list for anyone that works with the CommandClient.
  • BadArgument is thrown once again when an argument couldn't be resolved for a parameter that already had a default.
    • This should offer a better end-user experience when parsing fails but argument execution still proceeded. Users shall be confused no more!
    • Trivia: This was added in 1.4.4 but was never actually published as a release because it was such a small change
      • looks at Flight 1.4.3
  • The CompletableFuture returned by waitFor now has a non-null result type.
    • This was left over from an earlier Flight version that completed with null on timeout, but now we just throw an exception instead.
  • FlightInfo.VERSION and FlightInfo.GIT_REVISION are now updated at build-time.