What happens when I have 2 times Code: @EventHandler public void onInteract(PlayerInteractEvent e){ } and they both do different things?
I mean, what will happen when I have two eventhandlers of the same type "PlayerInteractEvent" and they are both in a different class, but still the same plugin. Will it work or not?
they should both work but like you say its random on which goes first. it would be better to put them into the one event
You should never register two handlers for the same event. And I can't see any reason why you would have to do so. What are you trying to achieve?
Oh ok. Well I never heard it would be a good idea to use two handlers for one event. Reason might be what MUG806 and NoLiver92 wrote. You can't say which one will fire first. And it seems redundant, because even if someone needs the handler to do different things in different situations, the distinction can be done in this single handler.