Sure: at the moment my skybridge captures stars, and brings them to an appropriate location for collection. This happens at night, so of course, plenty of monsters floating around outside. To simplify things, I have a one tile thick roof that the stars land on, through which I can grab them without having to deal with fighting stuff.
My ponderings were around how to automate the process of getting the stars into the base without also opening things up for monsters. I can use a vertical hoik to move them down, after they get to the center, but that requires a solid wall cutting the map in half, and it's not ... elegant. If they had triggered pressure plates, I could have used that to quickly open and then close an airlock style entrance to allow them in with minimal chance of monsters eating my NPCs.
If I had the appropriate detectors, of course, it would simply actuate when <star> and <not monster>, removing even the chance of them slipping in.
None of it is really necessary. What I have works, but like building a fancy kitchen to stick an NPC in, it's all about enjoying the challenge of designing and building clever solutions to things, not just the end result. (I got my couple of moonlord kills, so while I am gradually working through bosses in this new world, I'm doing it slowly and spending way more time on building things.)
I hope that explains well enough why I was asking about all this. I'll probably, for now, end up building the vertical hoik, rather than trying to figure out the code behind the player detector and how to add new instances of those in a mod. Not quite /that/ enthusiastic about the idea yet.