title: Bukkit - Get Variables From Other @EventHandlers?
body: <p>I was wondering how I would get a variable from a different @EventHandler. My variable in this instance is an array list.</p>
  
  <p>My code is below:</p>
  
  <pre><code>@EventHandler
  public void onBlockBreak(BlockBreakEvent event) {
      ArrayList&lt;String&gt; build = new ArrayList();
      Player player = event.getPlayer();
      if(!player.isOp()) {
          event.setCancelled(true);
      }else if(!build.contains(player)) {
          event.setCancelled(true);
      }else if(build.contains(player)) {
          event.setCancelled(false);
      }
  }
  @EventHandler
  public void onPlayerJoin(PlayerJoinEvent event) {
      Player player = event.getPlayer();
      event.setJoinMessage("§4§l&gt;&gt;§a§l " + player + " §b§ljoined! §4§l&lt;&lt;");
      if(build.contains(player)) {
          build.remove(player);
  </code></pre>
  
  <p>Now, on the second @EventHandler it cannot resolve the variable "build" which is what I defined in the previous @EventHandler. So how can I make it so it works?</p>