Skip to content

2.0.0 Pre-Release 4

Pre-release
Pre-release

Choose a tag to compare

@wallenjos01 wallenjos01 released this 20 Nov 03:33
· 308 commits to master since this release

This pre-release adds a few item stack and proxy related features and fixes some bugs.

New Features:

  • Added Proxy::getPlayers(), which returns a Collection<ProxyPlayer>, representing all players connected to the proxy
  • Added ConversionUtil::toAdventure(), which converts a MidnightCore Component to an Adventure Component
  • Added ItemStack::getTranslationKey(), which returns the item's translation key for use in translate components
  • Added ItemStack::getRarityColor(), which returns the color the item appears according to its rarity.
    • For example: Golden Apples appear as aqua, and Enchanted Books appear as yellow.
  • Added ItemStack::getName(), which returns the display name of an ItemStack
    • This will be the item's custom name if set, and a translate component with the item's translation key otherwise.
  • Added a default translate placeholder, which accepts a translation key as a parameter, and becomes a translate component when resolved.

Fixed Bugs:

  • Fixed a bug which caused the modern component serializer to error out when serializing components without a color.
  • Fixed a bug which caused the modern component serializer to convert translate components into text components.
  • Fixed a bug which caused the UnresolvedComponent serializer to always fail if the input is a string, rather than if the input is not a string.
  • Fixed a bug which caused the UnresolvedComponent serializer to parse UTF-8 characters incorrectly.
  • Fixed the previously mentioned bug which caused YAML keys with periods in them to be serialized as hierarchies of subsections rather than just keys, causing name conflicts in some cases.
    • I did this by using LinkedHashMap objects over Bukkit's ConfigurationSection, and switched to a default Yaml instance rather than using Bukkit's. I haven't done any testing to know if this will cause other issues/incompatibilities, but I doubt it.
  • Fixed the previously mentioned bug which caused a "ghost" player model appear for a player when their skin is changed on legacy spigot versions.