Repository navigation
2.0.0 Pre-Release 4
Pre-release
Pre-release
·
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 aCollection<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 anItemStack- 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
UnresolvedComponentserializer to always fail if the input is a string, rather than if the input is not a string. - Fixed a bug which caused the
UnresolvedComponentserializer 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
LinkedHashMapobjects over Bukkit'sConfigurationSection, and switched to a defaultYamlinstance rather than using Bukkit's. I haven't done any testing to know if this will cause other issues/incompatibilities, but I doubt it.
- I did this by using
- Fixed the previously mentioned bug which caused a "ghost" player model appear for a player when their skin is changed on legacy spigot versions.