Hi, i'm making a sign bank plugin for my server that when a player right click on a deposit sign it receives a message asking how much money he wants to deposit. How can i get the answer to my plugin? I hope you understand me, my english is not good. this is some of the code. (is in spanish) @EventHandler public void depositar(PlayerInteractEvent depo) { Player jugador = depo.getPlayer(); if (depo.getAction().equals(Action.RIGHT_CLICK_BLOCK)) { if (depo.getClickedBlock().getState() instanceof Sign) { Sign letrero = (Sign) depo.getClickedBlock().getState(); if ((letrero.getLine(0).equals("§6[Banco]")) && (letrero.getLine(1).equals("F§8Depositar"))); { jugador.sendMessage(ChatColor.GREEN + "Escribe la cantidad de dinero que quieres depositar."); } } } }
The Conversation API should do, search about it in the Resources section. Or if you just want to do stuff yourself, a Set<String> to store players that are required to input that specific thing (use a Map<String, Integer> if you want to specify what action it must do), in your above event put the player in there then listen to player chat event and check if player is in that set (or map and check for action too) and read its message, convert it to whatever you need and do the stuff.