MCPcopy Create free account
hub / github.com/boxbeam/RedLib / onChat

Method onChat

src/redempt/redlib/misc/ChatPrompt.java:87–99  ·  view source on GitHub ↗
(AsyncPlayerChatEvent e)

Source from the content-addressed store, hash-verified

85 }
86
87 @EventHandler(priority = EventPriority.LOWEST)
88 public void onChat(AsyncPlayerChatEvent e) {
89 Prompt p = prompts.remove(e.getPlayer());
90 if (p == null) {
91 return;
92 }
93 e.setCancelled(true);
94 if (e.getMessage().equalsIgnoreCase(RedLib.msg("cancelText"))) {
95 p.cancel(CancelReason.PLAYER_CANCELLED);
96 return;
97 }
98 p.respond(e.getMessage());
99 }
100
101 @EventHandler
102 public void onLeave(PlayerQuitEvent e) {

Callers

nothing calls this directly

Calls 6

msgMethod · 0.95
cancelMethod · 0.95
respondMethod · 0.95
removeMethod · 0.65
getPlayerMethod · 0.45
setCancelledMethod · 0.45

Tested by

no test coverage detected