Scanning Through a Table

Discussion in 'Plugin Development' started by Tehepicford, Aug 25, 2012.

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

    Tehepicford

    How would I go around doing so using a for loop?
    What I want to scan through is:

    Code:
    Rules:
    - [1] Be Respectfull
    - [2] Be Kind
    Code:
        @EventHandler
        public void onPlayerJoin(PlayerJoinEvent event) {
            Player player = event.getPlayer();
            for(getConfig().getStringList("Rules");; ) {
            }
            
    That's what I have tried, I know it wont work so. Any ideas?
     
  2. Offline

    Giant

    Code:
    for(String rule : getConfig().getStringList("Rules")) {
         // print the rule
    }
    
    That should work I suppose.
     
Thread Status:
Not open for further replies.

Share This Page