More explanations for JsonMessage#toString

This commit is contained in:
themode 2020-10-21 16:08:33 +02:00
parent 618c2b5b17
commit ddc5da4415
2 changed files with 6 additions and 2 deletions

View File

@ -65,7 +65,7 @@ public class BossBar implements Viewable {
if (playerBossBars != null && playerBossBars.size() >= MAX_BOSSBAR) {
return false;
}
// Add to the map
addToPlayer(player);
return viewers.add(player);
}

View File

@ -22,6 +22,7 @@ public abstract class JsonMessage {
* Sent directly to the client.
*
* @return the json representation of the message
* @see #toString()
*/
public abstract JsonObject getJsonObject();
@ -35,9 +36,12 @@ public abstract class JsonMessage {
/**
* Gets the Json representation.
* <p>
* Used to send messages.
* Will check of the current cached compiled json is up-to-date in order to prevent
* re-parsing the message every time.
*
* @return the string json representation
* @see #getJsonObject()
* @see #refreshUpdate()
*/
@Override
public String toString() {