moved code to new structure
This commit is contained in:
57
src/main/java/de/steev/bm/Manager/GameManager.java
Normal file
57
src/main/java/de/steev/bm/Manager/GameManager.java
Normal file
@ -0,0 +1,57 @@
|
||||
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' };
|
||||
String[] s_rec = { "LLL", "LSL", " I " };
|
||||
Material[] s_mat = { Material.LEATHER, Material.STRING, Material.IRON_NUGGET };
|
||||
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, 1, Material.STRING, "String");
|
||||
|
||||
}
|
||||
|
||||
public BetterMinecraft getPlugin(){
|
||||
return plugin;
|
||||
}
|
||||
|
||||
public RecipyManager getRecipyManager() {
|
||||
return recipyManager;
|
||||
}
|
||||
|
||||
public PlayerManager getPlayerManager() {
|
||||
return playerManager;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user