类 ChatInput
java.lang.Object
io.github.lijinhong11.mittellib.utils.chat.ChatInput
-
方法概要
修饰符和类型方法说明static 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.
-
方法详细资料
-
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. Afterward the given callback will be invoked.- 参数:
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. Afterward the given callback will be invoked. With the predicate you can filter out unwanted inputs. Like commands for example.- 参数:
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.- 参数:
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.- 参数:
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
public static void queue(@Nonnull Plugin plugin, @Nonnull Player p, @Nonnull ChatInputHandler callback)
-