Codota Logo
net.md_5.bungee.api.chat
Code IndexAdd Codota to your IDE (free)

How to use net.md_5.bungee.api.chat

Best Java code snippets using net.md_5.bungee.api.chat (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: SpigotMC/BungeeCord

/**
 * Parse text to BaseComponent[] with colors and format, appends the text to
 * the builder and makes it the current target for formatting. The component
 * will have all the formatting from previous part.
 *
 * @param text the text to append
 * @return this ComponentBuilder for chaining
 */
public ComponentBuilder appendLegacy(String text)
{
  return append( TextComponent.fromLegacyText( text ) );
}
origin: SpigotMC/BungeeCord

/**
 * Adds a text substitution to the component. The text will inherit this
 * component's formatting
 *
 * @param text the text to substitute
 */
public void addWith(String text)
{
  addWith( new TextComponent( text ) );
}
origin: SpigotMC/BungeeCord

/**
 * Appends a text element to the component. The text will inherit this
 * component's formatting
 *
 * @param text the text to append
 */
public void addExtra(String text)
{
  addExtra( new TextComponent( text ) );
}
origin: SpigotMC/BungeeCord

  void toLegacyText(StringBuilder builder)
  {
    if ( extra != null )
    {
      for ( BaseComponent e : extra )
      {
        e.toLegacyText( builder );
      }
    }
  }
}
origin: SpigotMC/BungeeCord

/**
 * Creates a TextComponent with formatting and text from the passed
 * component
 *
 * @param textComponent the component to copy from
 */
public TextComponent(TextComponent textComponent)
{
  super( textComponent );
  setText( textComponent.getText() );
}
origin: SpigotMC/BungeeCord

/**
 * Sets the click event for the current part.
 *
 * @param clickEvent the click event
 * @return this ComponentBuilder for chaining
 */
public ComponentBuilder event(ClickEvent clickEvent)
{
  current.setClickEvent( clickEvent );
  return this;
}
origin: SpigotMC/BungeeCord

/**
 * Sets whether the current part is bold.
 *
 * @param bold whether this part is bold
 * @return this ComponentBuilder for chaining
 */
public ComponentBuilder bold(boolean bold)
{
  current.setBold( bold );
  return this;
}
origin: SpigotMC/BungeeCord

/**
 * Creates a duplicate of this TranslatableComponent.
 *
 * @return the duplicate of this TranslatableComponent.
 */
@Override
public BaseComponent duplicate()
{
  return new TranslatableComponent( this );
}
origin: SpigotMC/BungeeCord

/**
 * Sets whether the current part is obfuscated.
 *
 * @param obfuscated whether this part is obfuscated
 * @return this ComponentBuilder for chaining
 */
public ComponentBuilder obfuscated(boolean obfuscated)
{
  current.setObfuscated( obfuscated );
  return this;
}
origin: SpigotMC/BungeeCord

/**
 * Sets the current part back to normal settings. Only text is kept.
 *
 * @return this ComponentBuilder for chaining
 */
public ComponentBuilder reset()
{
  return retain( FormatRetention.NONE );
}
origin: SpigotMC/BungeeCord

/**
 * Creates a selector component from the original to clone it.
 *
 * @param original the original for the new selector component
 */
public SelectorComponent(SelectorComponent original)
{
  super( original );
  setSelector( original.getSelector() );
}
origin: SpigotMC/BungeeCord

/**
 * 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;
}
origin: SpigotMC/BungeeCord

void toPlainText(StringBuilder builder)
{
  if ( extra != null )
  {
    for ( BaseComponent e : extra )
    {
      e.toPlainText( builder );
    }
  }
}
origin: SpigotMC/BungeeCord

/**
 * Creates a keybind component from the original to clone it.
 *
 * @param original the original for the new keybind component.
 */
public KeybindComponent(KeybindComponent original)
{
  super( original );
  setKeybind( original.getKeybind() );
}
origin: SpigotMC/BungeeCord

/**
 * Sets whether the current part is italic.
 *
 * @param italic whether this part is italic
 * @return this ComponentBuilder for chaining
 */
public ComponentBuilder italic(boolean italic)
{
  current.setItalic( italic );
  return this;
}
origin: SpigotMC/BungeeCord

@Override
public ScoreComponent duplicate()
{
  return new ScoreComponent( this );
}
origin: SpigotMC/BungeeCord

@Override
public SelectorComponent duplicate()
{
  return new SelectorComponent( this );
}
origin: SpigotMC/BungeeCord

@Override
public BaseComponent duplicate()
{
  return new KeybindComponent( this );
}
origin: SpigotMC/BungeeCord

/**
 * Creates a keybind component with the passed internal keybind value.
 *
 * @param keybind the keybind value
 * @see Keybinds
 */
public KeybindComponent(String keybind)
{
  setKeybind( keybind );
}
origin: GlowstoneMC/Glowstone

/**
 * Converts a {@link Title} to 3 instances of {@link TitleMessage}.
 *
 * @param title the title to convert
 * @return 3 messages: the first sets the title, the second sets the subtitle, and the third
 *         sets the fade/stay/fade durations
 */
public static TitleMessage[] fromTitle(Title title) {
  TextMessage titleMessage = asTextMessage(BaseComponent.toLegacyText(title.getTitle()));
  TextMessage subTitleMessage = title.getSubtitle() != null ? asTextMessage(
      BaseComponent.toLegacyText(title.getSubtitle())) : asTextMessage(null);
  return new TitleMessage[]{
    new TitleMessage(Action.TITLE, titleMessage),
    new TitleMessage(Action.SUBTITLE, subTitleMessage),
    new TitleMessage(Action.TIMES, title.getFadeIn(), title.getStay(), title
        .getFadeOut())
  };
}
net.md_5.bungee.api.chat

Most used classes

  • TextComponent
  • ComponentBuilder
    ComponentBuilder simplifies creating basic messages by allowing the use of a chainable builder.
  • ClickEvent
  • HoverEvent
  • BaseComponent
  • ClickEvent$Action,
  • HoverEvent$Action,
  • ScoreComponent,
  • ComponentBuilder$Joiner,
  • KeybindComponent,
  • SelectorComponent
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now