Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions api/src/main/java/net/kyori/adventure/sound/SoundImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,17 @@ public int hashCode() {
return result;
}

@Override
public String toString() {
return "SoundImpl{" +
"name=" + this.name() +
", source=" + this.source +
", volume=" + this.volume +
", pitch=" + this.pitch +
", seed=" + this.seed +
'}';
}

static final class BuilderImpl implements Builder {
private static final float DEFAULT_VOLUME = 1f;
private static final float DEFAULT_PITCH = 1f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,16 @@ public int hashCode() {
return this.bitSet;
}

@Override
public String toString() {
return "DecorationMap{" +
Arrays.stream(DECORATIONS)
.map(decoration -> decoration.toString() + '=' + this.get(decoration))
.reduce((a, b) -> a + ", " + b)
.orElse("") +
'}';
}

final class EntrySet extends AbstractSet<Entry<TextDecoration, TextDecoration.State>> {
@Override
public Iterator<Entry<TextDecoration, TextDecoration.State>> iterator() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,15 @@ public final int hashCode() {
return this.name.hashCode();
}

@Override
public String toString() {
return "AbstractTranslationStore{" +
"name=" + this.name +
", translations=" + this.translations +
", defaultLocale=" + this.defaultLocale +
'}';
}

private final class Translation {
private final String key;
private final Map<Locale, T> translations;
Expand Down Expand Up @@ -203,6 +212,14 @@ public boolean equals(final Object other) {
public int hashCode() {
return Objects.hash(this.key, this.translations);
}

@Override
public String toString() {
return "Translation{" +
"key='" + this.key + '\'' +
", translations=" + this.translations +
'}';
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,11 @@ public boolean canTranslate(final String key, final Locale locale) {
}
return null;
}

@Override
public String toString() {
return "GlobalTranslatorImpl{" +
"sources=" + this.sources +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,13 @@ public int hashCode() {
result = (31 * result) + Boolean.hashCode(this.reset);
return result;
}

@Override
public String toString() {
return "LegacyFormat{" +
"color=" + this.color +
", decoration=" + this.decoration +
", reset=" + this.reset +
'}';
}
}