wrap to TextComponent

This commit is contained in:
Matthew Miller 2019-04-25 19:20:29 +10:00
parent 5606e752c2
commit b1e43b7561
4 changed files with 8 additions and 8 deletions

View File

@ -19,7 +19,7 @@
package com.sk89q.worldedit.util.formatting.component; package com.sk89q.worldedit.util.formatting.component;
import com.sk89q.worldedit.util.formatting.text.Component; import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.format.TextColor; import com.sk89q.worldedit.util.formatting.text.format.TextColor;
/** /**
@ -37,7 +37,7 @@ public class CodeFormat extends TextComponentProducer {
* @param texts The text * @param texts The text
* @return The Component * @return The Component
*/ */
public static Component wrap(String ... texts) { public static TextComponent wrap(String ... texts) {
CodeFormat code = new CodeFormat(); CodeFormat code = new CodeFormat();
for (String text: texts) { for (String text: texts) {
code.append(text); code.append(text);

View File

@ -19,7 +19,7 @@
package com.sk89q.worldedit.util.formatting.component; package com.sk89q.worldedit.util.formatting.component;
import com.sk89q.worldedit.util.formatting.text.Component; import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.format.TextColor; import com.sk89q.worldedit.util.formatting.text.format.TextColor;
/** /**
@ -40,7 +40,7 @@ public class ErrorFormat extends TextComponentProducer {
* @param texts The text * @param texts The text
* @return The Component * @return The Component
*/ */
public static Component wrap(String ... texts) { public static TextComponent wrap(String ... texts) {
ErrorFormat error = new ErrorFormat(); ErrorFormat error = new ErrorFormat();
for (String component : texts) { for (String component : texts) {
error.append(component); error.append(component);

View File

@ -19,7 +19,7 @@
package com.sk89q.worldedit.util.formatting.component; package com.sk89q.worldedit.util.formatting.component;
import com.sk89q.worldedit.util.formatting.text.Component; import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.format.TextColor; import com.sk89q.worldedit.util.formatting.text.format.TextColor;
/** /**
@ -40,7 +40,7 @@ public class LabelFormat extends TextComponentProducer {
* @param texts The text * @param texts The text
* @return The Component * @return The Component
*/ */
public static Component wrap(String ... texts) { public static TextComponent wrap(String ... texts) {
LabelFormat label = new LabelFormat(); LabelFormat label = new LabelFormat();
for (String component : texts) { for (String component : texts) {
label.append(component); label.append(component);

View File

@ -19,7 +19,7 @@
package com.sk89q.worldedit.util.formatting.component; package com.sk89q.worldedit.util.formatting.component;
import com.sk89q.worldedit.util.formatting.text.Component; import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.format.TextColor; import com.sk89q.worldedit.util.formatting.text.format.TextColor;
/** /**
@ -40,7 +40,7 @@ public class SubtleFormat extends TextComponentProducer {
* @param texts The text * @param texts The text
* @return The Component * @return The Component
*/ */
public static Component wrap(String ... texts) { public static TextComponent wrap(String ... texts) {
SubtleFormat subtle = new SubtleFormat(); SubtleFormat subtle = new SubtleFormat();
for (String component : texts) { for (String component : texts) {
subtle.append(component); subtle.append(component);