Inspection and Cleanup
This commit is contained in:
@@ -5,6 +5,7 @@ import eu.mhsl.minenet.minigames.message.component.TranslatedComponent;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.ComponentBuilder;
|
||||
import net.kyori.adventure.text.ComponentLike;
|
||||
import net.kyori.adventure.text.TextComponent;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
import net.minestom.server.entity.Player;
|
||||
|
||||
@@ -13,7 +14,7 @@ import java.util.List;
|
||||
|
||||
public abstract class TranslatableMessage implements Sendable {
|
||||
int indention = 0;
|
||||
List<ComponentLike> chain = new ArrayList<>();
|
||||
final List<ComponentLike> chain = new ArrayList<>();
|
||||
|
||||
public TranslatableMessage() {
|
||||
|
||||
@@ -65,7 +66,7 @@ public abstract class TranslatableMessage implements Sendable {
|
||||
|
||||
|
||||
public Component build(Player p) {
|
||||
ComponentBuilder out = Component.text();
|
||||
ComponentBuilder<TextComponent, TextComponent.Builder> out = Component.text();
|
||||
chain.forEach(componentLike -> {
|
||||
if(componentLike instanceof Translatable t) t.assemble(p);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user