Help with Multiple Booleans being True

Discussion in 'Plugin Development' started by Alvarez96, Feb 9, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    Alvarez96

    Im working on my very first plugin and successfully got my config file filled with Booleans that corespond with the action they will take in the plugin:

    Booleans:
    Kill: false
    Smite: true


    Now the way that the code is set up disables the possibility for more than one Boolean to be true. Is there a simple way that I can get the plugin to check for multiple trues without an && in the if statement.

    If I needed to put an && in the if statements, it would take a while and Im hoping you guys can help me out.

    Thanks for reading this and please excuse my poor knowledge in Java terms.
     
  2. Offline

    Njol

    You should describe your problem in more detail. Which booleans do you want to check and how many of them? Are they in a list? etc.
     
  3. Offline

    nisovin

    Instead of having a bunch of booleans, why not just have one option, like:

    Option: Kill
    or
    Option: Smite

    To answer your question, just create a loop and a counter.
     
Thread Status:
Not open for further replies.

Share This Page