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) { if (playerBossBars != null && playerBossBars.size() >= MAX_BOSSBAR) {
return false; return false;
} }
// Add to the map
addToPlayer(player); addToPlayer(player);
return viewers.add(player); return viewers.add(player);
} }

View File

@ -22,6 +22,7 @@ public abstract class JsonMessage {
* Sent directly to the client. * Sent directly to the client.
* *
* @return the json representation of the message * @return the json representation of the message
* @see #toString()
*/ */
public abstract JsonObject getJsonObject(); public abstract JsonObject getJsonObject();
@ -35,9 +36,12 @@ public abstract class JsonMessage {
/** /**
* Gets the Json representation. * Gets the Json representation.
* <p> * <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 * @return the string json representation
* @see #getJsonObject()
* @see #refreshUpdate()
*/ */
@Override @Override
public String toString() { public String toString() {