How to find out if a specific node exists in config

Hey guys, should be my last question for a while.

I’m just wondering how you’d go about checking if a node actually exists in config?

For example, I’d have the setup as:

jobs {
   miner {
   //miner stuff
   }
}

How then would I find out if the ‘miner’ node actually exists, using a conditional statement, etc?

EDIT: Should’ve been a bit more specific. I’ve added support for custom jobs in my jobs plugin, and would like to check if the ‘miner’ node exists in the first place, in order to allow the player to join that job. Eventually just gonna chuck all this stuff in a database when I have more time to spare on it.

node.isVirtual()

You’re a champion, mate!

EDIT: Turns out I’m an idiot and should’ve just looked for the Javadocs in the first place. Disregard my original reply!

Thank you very much for your help, mate!

1 Like