i know this isn't strictly bukkit-related, but this is a serious gap in my java knowledge that i need to fill. so what i have is a program (not a plugin) that listens in on a port to data sent from a plugin. so far i've successfully connected the two together and transmitted data. the problem is, though, once a connection is made and the data is sent, the main thread terminates, when i want it to go back and listen for another connection, or possibly be able to accept multiple connections at a time. i thought about using a while(1==0) loop or something like that, but there must be a real way to do this. like, how do bukkit listeners work? how do they constantly listen without terminating a thread?