package de.steev.bm.Manager; import de.steev.bm.BetterMinecraft; import org.bukkit.Material; import org.bukkit.entity.Player; /** * Gamemanager controlls the plugins game logic */ public class GameManager { private BetterMinecraft plugin; private RecipyManager recipyManager; private PlayerManager playerManager; /** * initilizes the Gamemanager and all systems beneath it * @param plugin the plugin reference */ public GameManager(BetterMinecraft plugin) { plugin.getLogger().info("Initializing Gamemanager"); this.plugin = plugin; this.plugin.getLogger().info("Moving logger to internal plugin reference"); this.plugin.getLogger().info("Initilizing other managers"); this.recipyManager = new RecipyManager(this); this.playerManager = new PlayerManager(this); this.plugin.getLogger().info("registring Recipies"); this.plugin.getLogger().info("saddle"); char[] s_ing = { 'L', 'S', 'I', 'W' }; String[] s_rec = { "LLL", "SWS", "I I" }; Material[] s_mat = { Material.LEATHER, Material.STRING, Material.IRON_INGOT, Material.WOOL}; this.recipyManager.RegisterNew(s_ing, s_mat, s_rec, 1, Material.SADDLE, "Saddle"); this.plugin.getLogger().info("String"); char[] w_ing = { 'W', 'F', }; String[] w_rec = { " W ", "WFW", " W " }; Material[] w_mat = { Material.WHITE_WOOL, Material.FLINT }; this.recipyManager.RegisterNew(w_ing, w_mat, w_rec, 4, Material.STRING, "String"); } public BetterMinecraft getPlugin(){ return plugin; } public RecipyManager getRecipyManager() { return recipyManager; } public PlayerManager getPlayerManager() { return playerManager; } }