Description
I'd like to send error messages, using my custom message class, which implements ComponentLike interface.
At the moment, my error handling in commands looks like this:
if (!player.hasTown())
throw CommandAPIBukkit.failWithAdventureComponent(message(ERR_WITHOUT_TOWN).asComponent());
After implementing suggested feature, my error handling would be:
if (!player.hasTown())
throw CommandAPIBukkit.failWithAdventureComponent(message(ERR_WITHOUT_TOWN));
The second option looks much easier and prettier.
Expected code
CommandAPIBukkit#failWithAdventureComponent(ComponentLike)
Extra details
No response
Description
I'd like to send error messages, using my custom message class, which implements
ComponentLikeinterface.At the moment, my error handling in commands looks like this:
After implementing suggested feature, my error handling would be:
The second option looks much easier and prettier.
Expected code
Extra details
No response