mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-27 20:59:12 +01:00
Add ComponentBuilder.insertion()
This commit is contained in:
parent
0646a3090a
commit
7d2c2ab074
@ -156,6 +156,18 @@ public class ComponentBuilder
|
||||
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.
|
||||
*
|
||||
@ -210,6 +222,7 @@ public class ComponentBuilder
|
||||
break;
|
||||
case EVENTS:
|
||||
current = new TextComponent( current.getText() );
|
||||
current.setInsertion( previous.getInsertion() );
|
||||
current.setClickEvent( previous.getClickEvent() );
|
||||
current.setHoverEvent( previous.getHoverEvent() );
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user