Class ChatInput

java.lang.Object
io.github.bakedlibs.dough.chat.ChatInput

public final class ChatInput extends Object
  • Method Details

    • waitForPlayer

      public static void waitForPlayer(@Nonnull Plugin plugin, @Nonnull Player p, @Nonnull Consumer<String> handler)
      This method waits for the Player to write something in chat. Afterwards the given callback will be invoked.
      Parameters:
      plugin - The Plugin performing this action
      p - The Player that we are waiting for
      handler - A callback to invoke when the Player has entered some text
    • waitForPlayer

      public static void waitForPlayer(@Nonnull Plugin plugin, @Nonnull Player p, @Nonnull Predicate<String> predicate, @Nonnull Consumer<String> handler)
      This method waits for the Player to write something in chat. Afterwards the given callback will be invoked. With the predicate you can filter out unwanted inputs. Like commands for example.
      Parameters:
      plugin - The Plugin performing this action
      p - The Player that we are waiting for
      predicate - A Filter for the messages the Player types in
      handler - A callback to invoke when the Player has entered some text
    • waitForPlayer

      public static void waitForPlayer(@Nonnull Plugin plugin, @Nonnull Player p, @Nonnull BiConsumer<Player,String> handler)
      This method waits for the Player to write something in chat. Afterwards the given callback will be invoked.
      Parameters:
      plugin - The Plugin performing this action
      p - The Player that we are waiting for
      handler - A callback to invoke when the Player has entered some text
    • waitForPlayer

      public static void waitForPlayer(@Nonnull Plugin plugin, @Nonnull Player p, @Nonnull Predicate<String> predicate, @Nonnull BiConsumer<Player,String> handler)
      This method waits for the Player to write something in chat. Afterwards the given callback will be invoked. With the predicate you can filter out unwanted inputs. Like commands for example.
      Parameters:
      plugin - The Plugin performing this action
      p - The Player that we are waiting for
      predicate - A Filter for the messages the Player types in
      handler - A callback to invoke when the Player has entered some text
    • queue

      public static void queue(@Nonnull Plugin plugin, @Nonnull Player p, @Nonnull ChatInputHandler callback)