title: Bukkit Using Multiple Classes
body: <p>I'm trying to learn Java &amp; Bukkit at the same time ( I have learnt some basic Java previously a few months back and made a simple text game).</p>
  
  <p>I know what I'm doing when I'm using 1 class but, as you may know, everything became messy so I'm re-coding everything but attempting to make it a lot cleaner but I've come across a problem, apart from the main class, no other classes work, here is my code.</p>
  
  <p>MAIN CLASS:</p>
  
  <pre><code>package me.Camaloony.RoyalCosmetics;
  
  import java.util.logging.Logger;
  
  import org.bukkit.Bukkit;
  import org.bukkit.event.Listener;
  import org.bukkit.plugin.PluginManager;
  import org.bukkit.plugin.java.JavaPlugin;
  
  import net.md_5.bungee.api.ChatColor;
  
  public class Core extends JavaPlugin implements Listener {
  
  Logger myPluginLogger = Bukkit.getLogger();
  
  @Override
  public void onEnable()
  {
      PluginManager manager = getServer().getPluginManager();
          manager.registerEvents(this, this);
      Bukkit.getServer().getConsoleSender().sendMessage(ChatColor.RED + "=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
      Bukkit.getServer().getConsoleSender().sendMessage(ChatColor.AQUA + "Royal Cosmetics has been enabled!");
      Bukkit.getServer().getConsoleSender().sendMessage(ChatColor.RED + "=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
  }
  @Override
  public void onDisable()
  {
      myPluginLogger.info("Test 1 has been disabled!");
      myPluginLogger.severe("Test 1 has an error and has not loaded.");   
      }
  }
  </code></pre>
  
  <p>Here is my 2ND CLASS</p>
  
  <pre><code>package me.Camaloony.RoyalCosmetics;
  
  import java.util.ArrayList;
  
  import org.bukkit.Bukkit;
  import org.bukkit.Material;
  import org.bukkit.command.Command;
  import org.bukkit.command.CommandSender;
  import org.bukkit.entity.Player;
  import org.bukkit.event.EventHandler;
  import org.bukkit.event.Listener;
  import org.bukkit.event.inventory.InventoryClickEvent;
  import org.bukkit.inventory.Inventory;
  import org.bukkit.inventory.ItemStack;
  import org.bukkit.inventory.meta.ItemMeta;
  
  public class MainGUI implements Listener {
  
      public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
  
          Player player = (Player) sender;
  
          if (commandLabel.equalsIgnoreCase("Cosmetics")) {
              createMainMenu(player);
          }
  
          return false;
      }
  
      @EventHandler
      public void onInvClick(InventoryClickEvent event){
          if (event.getCurrentItem().getItemMeta().getDisplayName().contains("Particles GUI")) {
              event.setCancelled(true);
          }
      }
  
      public void createMainMenu(Player player) {
          Inventory inv = Bukkit.getServer().createInventory(null, 45, "Royal Cosmetics");
  
          ItemStack item1 = new ItemStack(Material.REDSTONE);
  
          ItemMeta item1Meta = item1.getItemMeta();
  
          ArrayList&lt;String&gt; item1Lore = new ArrayList&lt;String&gt;();
  
          item1Lore.add("Click here to go to the particles GUI");
  
          item1Meta.setDisplayName("Particles GUI");
          item1Meta.setLore(item1Lore);
  
          item1.setItemMeta(item1Meta);
  
          inv.setItem(0, item1);
  
          player.openInventory(inv);
      }
  
  }
  </code></pre>
  
  <p>How would I make it so the 2nd class is actually 'read' ?</p>
  
  <p>Thanks a lot!</p>