Package io.github.bakedlibs.dough.chat
Class ChatInput
java.lang.Object
io.github.bakedlibs.dough.chat.ChatInput
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidqueue(Plugin plugin, Player p, ChatInputHandler callback) static voidwaitForPlayer(Plugin plugin, Player p, BiConsumer<Player, String> handler) This method waits for the Player to write something in chat.static voidwaitForPlayer(Plugin plugin, Player p, Consumer<String> handler) This method waits for the Player to write something in chat.static voidwaitForPlayer(Plugin plugin, Player p, Predicate<String> predicate, BiConsumer<Player, String> handler) This method waits for the Player to write something in chat.static voidThis method waits for the Player to write something in chat.
-
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 actionp- The Player that we are waiting forhandler- 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 actionp- The Player that we are waiting forpredicate- A Filter for the messages the Player types inhandler- 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 actionp- The Player that we are waiting forhandler- 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 actionp- The Player that we are waiting forpredicate- A Filter for the messages the Player types inhandler- A callback to invoke when the Player has entered some text
-
queue
-