4.2

Release

rojo8399 released this version on Nov 3, 2017

160.5 KB
Download

What’s new in 4.2:

This update has been a long time coming and I am sorry it took so long. I have been really busy with university and as such neglected the plugin.

This update is VERY big. If you find bugs or issues, please report them on the GitHub page so they can be fixed as soon as possible. I expect most plugins using this plugin should still work properly but if not please report the issues on GitHub.

  • Transitioned from [CommandSource, User and MessageReceiver] minimum level to [Subject, DataHolder, MessageReceiver and Locatable] as minimum level information holders. Everything should still function the same but now there is support for slightly lower level data.
  • Fixed issues with source observer value checks.
  • API BREAKING (though not too important I hope): Changed builder() method in PlaceholderService to builder(Class, Class, Class). This makes internals a lot easier as well as builder chaining.
  • Economy additions
    • Added baltop which calculates the top balances for a currency. Examples: baltop, baltop_5, baltop_tokens, baltop_7_tokens.
  • Sound placeholder now supports [sound]_all or all_[sound], to play to all players.
  • Many economy fixes
    • Fixed issue where non-default currencies were not properly being replaced.
    • Fixed issues with `%economy_baltop% placeholder, should now function as expected.
  • Null value support
    • In placeholder method calls, it is safe to assume all parameters are present and not null unless you specify the @Nullable annotation.
  • Automatic string standardization now allowed in the @Token annotation. Specify fix=true on a String parameter and it will be made all lower case.
  • Internal placeholder generation fixes. Primitives now work properly.
  • Added uptime placeholder to server. This calculates uptimes over time and saves to file. I will be adding an option to disable this soon.
  • Fixed configuration save/load for placeholders.
    • BREAKING CHANGE: If you use @Setting to store data for placeholders, you MUST include the new @Attach annotation to attach it to a placeholder. The annotation takes in a String value which is the id of the placeholder to attach to.
  • Objects in parameters of methods will now be deserialized. You can, for instance, have an Integer token instead of a String and it will automatically parse for you.
  • Lots of cleanup
  • Better debugging for placeholders.
    • If a placeholder fails to parse, it will show up what went wrong in red. If the id is wrong, the whole placeholder will be red. If there are issues with the tokens, the tokens will be in red. If this is displayed in chat, you can hover over the placeholder to see what went wrong and if there are any suggestions for a fix.
  • Changed default config file. If you delete the current config file you will get the new, proper file.
  • Fixed enable/disable a bit, should have better restart-retention.
  • Separated API from Implementation. For most purposes, there should be no issues, unless you try to use implementation-dependent functions.

The next update will include the fixes for uptime as well as a new @Requires placeholder which establishes the requirements for a placeholder. You can specify what minimum (or maximum) Sponge version, or any plugin dependencies, and more externalized messages.

*I have yet to update the wiki page. Please be patient as I do not have much time.

Check out the plugin wiki!

View the plugin on GitHub!

See the plugin’s statistics!

Dependencies