Hi, I have two events : Code: public void tapeCommand(PlayerCommandPreprocessEvent e){ ... } public void ouvreCoffre(PlayerInteractEvent e){ ... } I would like to execute my code in the second event if the command was typed. I have tried to link the two with a variable but once the order has been entered all players can use the second part. I hope I was clear ^^
Tried doing a separate method that gets passed over all the variables that you need and both events can offer?
Code:java public void event1(Event e){ run(e.getPlayer);}public void event2(Event e){ run(e.getPlayer);}public void run(Player p){ //and any other information you can get from both events that you may need}