Description
It would be nice to have a JSONMessage#replace(String, String/Object)
method witch would replace any appearance of the target String with the provided String/Object (Whichever goes better).
Additionally would a JSONMessage#from(String)
sure be useful too. This would essentially attempt to parse the provided String into a JSONMessage object (Essentially parsing JSON to a JSONMessage object when possible).
I currently try to implement JSONMessage into a plugin, but this requires me to replace placeholders, which I can't all just replace before the JSONMessage#then(String)
method, so I have to use an own ReflectionHelper class to send the message as BungeeCord's ComponentSerializer seems to be utter trash.
Perhaps another alternative would be a String
field for the JSONMessage#send(Player...)
method? Like JSONMessage#send(String, Player...)
which would take the String and send it to the players.