Skip to content

Release 3.0.0 - More Sky Color Options

Compare
Choose a tag to compare
@dscalzi dscalzi released this 22 Nov 20:23
· 25 commits to master since this release

Release v3.0.0

This release modifies the base command to add an additional optional parameter. Japanese is now a supported language.

/SkyChanger <#> [#]

The second number sends an additional packet to the client, which can be combined with the first number for more color possibilities. This argument is optional, and can be omitted. Note that if it is not present, the second packet will not be sent altogether.

Ex.

/SkyChanger 4 = red
/SkyChanger 4 10 = light blue
/SkyChanger 4 = light blue (second packet is unchanged)
/SkyChanger 4 0 = red (second packet is reset to 0)

This release also includes a large refactor of the codebase, moving all the core functionality to a core module. This will make maintenance easier in the future, as most of the code will only need to be edited in one place. This refactor includes some API changes.


API Changes

Breaking Changes

There is now a single API class for both implementations. Each implementation will have a SkyChanger class which can be used to grab the implementation-specific version.

com.dscalzi.skychanger.bukkit.api.SkyAPI -> com.dscalzi.skychanger.core.api.SkyAPI
com.dscalzi.skychanger.sponge.api.SkyAPI -> com.dscalzi.skychanger.core.api.SkyAPI

The API functions now take an IPlayer as an argument. New usage:

api.changeSky(SkyChanger.wrapPlayer(player), 3F)

New Features

You can now send two packets to change the sky color. Each packet is represented by the new SkyPacket enum.

  • SkyPacket.FADE_VALUE = Original packet (id 7)
  • SkyPacket.FADE_TIME = New packet (id 8)

SkyAPI offers a new function allowing you to change the packet.

boolean changeSky(IPlayer player, SkyPacket packet, float number);

ex.

api.changeSky(SkyChanger.wrapPlayer(player), SkyPacket.FADE_VALUE, 4F)

Other changes

  • a231569 Added Japanese language file.
  • 18fdda5 Minor correction to the Chinese Language file