title: Problem with integers when logging to minecraft server
body: <p>I am making a plugin for logging (authme isn't working for me), which will send you 5 messages to warn you about logging and then it will kick you. Everything works perfectly, but int i will be after this 6. I know, I can set i to 1, but what can I do, if there are logging more players?</p>
  <pre><code>int i = 1;
      
      void waitForLogin(String message, Player p) {
          Bukkit.getScheduler().runTaskLater(plugin, () -&gt; justDoIt(message, p), 60);
          Bukkit.getScheduler().runTaskLater(plugin, () -&gt; justDoIt(message, p), 120);
          Bukkit.getScheduler().runTaskLater(plugin, () -&gt; justDoIt(message, p), 180);
          Bukkit.getScheduler().runTaskLater(plugin, () -&gt; justDoIt(message, p), 240);
          Bukkit.getScheduler().runTaskLater(plugin, () -&gt; justDoIt(message, p), 300);
          Bukkit.getScheduler().runTaskLater(plugin, () -&gt; justDoIt(message, p), 360);
      }
      
      void justDoIt(String message, Player p) {
          if (may_loggin.contains(p)) {
              if (i == 6) {
                  p.kickPlayer(ChatColor.DARK_RED + &quot;Cas vyprsel!&quot;);
              } else {
                  p.sendMessage(message);
                  i++;
              }
          }
      }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/rMAQU.png" rel="nofollow noreferrer">My code</a></p>