Add ComponentBuilder.insertion()
This commit is contained in:
parent
0646a3090a
commit
7d2c2ab074
@ -156,6 +156,18 @@ public class ComponentBuilder
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the insertion text for the current part.
|
||||||
|
*
|
||||||
|
* @param insertion the insertion text
|
||||||
|
* @return this ComponentBuilder for chaining
|
||||||
|
*/
|
||||||
|
public ComponentBuilder insertion(String insertion)
|
||||||
|
{
|
||||||
|
current.setInsertion( insertion );
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the click event for the current part.
|
* Sets the click event for the current part.
|
||||||
*
|
*
|
||||||
@ -210,6 +222,7 @@ public class ComponentBuilder
|
|||||||
break;
|
break;
|
||||||
case EVENTS:
|
case EVENTS:
|
||||||
current = new TextComponent( current.getText() );
|
current = new TextComponent( current.getText() );
|
||||||
|
current.setInsertion( previous.getInsertion() );
|
||||||
current.setClickEvent( previous.getClickEvent() );
|
current.setClickEvent( previous.getClickEvent() );
|
||||||
current.setHoverEvent( previous.getHoverEvent() );
|
current.setHoverEvent( previous.getHoverEvent() );
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user