예제 #1
0
 /**
  * Set the behavior of the current editing component to instruct the client to send the specified
  * string to the server as a chat message when the currently edited part of the {@code
  * FancyMessage} is clicked. The client <b>will</b> immediately send the command to the server to
  * be executed when the editing component is clicked.
  *
  * @param command The text to display in the chat bar of the client.
  * @return This builder instance.
  */
 public FancyMessage command(final String command) {
   onClick("run_command", command);
   return this;
 }
예제 #2
0
 /**
  * Set the behavior of the current editing component to instruct the client to open a webpage in
  * the client's web browser when the currently edited part of the {@code FancyMessage} is clicked.
  *
  * @param url The URL of the page to open when the link is clicked.
  * @return This builder instance.
  */
 public FancyMessage link(final String url) {
   onClick("open_url", url);
   return this;
 }
예제 #3
0
 /**
  * Set the behavior of the current editing component to instruct the client to replace the chat
  * input box content with the specified string when the currently edited part of the {@code
  * FancyMessage} is clicked. The client will not immediately send the command to the server to be
  * executed unless the client player submits the command/chat message, usually with the enter key.
  *
  * @param command The text to display in the chat bar of the client.
  * @return This builder instance.
  */
 public FancyMessage suggest(final String command) {
   onClick("suggest_command", command);
   return this;
 }
예제 #4
0
 /**
  * Set the behavior of the current editing component to instruct the client to open a file on the
  * client side filesystem when the currently edited part of the {@code FancyMessage} is clicked.
  *
  * @param path The path of the file on the client filesystem.
  * @return This builder instance.
  */
 public FancyMessage file(final String path) {
   onClick("open_file", path);
   return this;
 }