45 lines
1.1 KiB
Java
45 lines
1.1 KiB
Java
package tokarotik.giftapi;
|
|
|
|
import org.bukkit.Bukkit;
|
|
import org.bukkit.configuration.file.FileConfiguration;
|
|
import org.bukkit.entity.Player;
|
|
import org.bukkit.inventory.ItemStack;
|
|
|
|
import tokarotik.giftapi.inventory.InventoryManager;
|
|
|
|
public class APIManager {
|
|
|
|
public Main plugin;
|
|
private FileConfiguration config;
|
|
private InventoryManager inventoryManager;
|
|
|
|
public APIManager(Main plugin, FileConfiguration config)
|
|
{
|
|
this.plugin = plugin;
|
|
this.config = config;
|
|
|
|
this.inventoryManager = new InventoryManager(
|
|
this.config.getString(ConfigPaths.GUINAME, "GiftAPI Menu"),
|
|
this.config.getString(ConfigPaths.GUIRIGHT, "<<right"),
|
|
this.config.getString(ConfigPaths.GUILEFT, "left>>")
|
|
);
|
|
|
|
Bukkit.getPluginManager().registerEvents(this.inventoryManager, this.plugin);
|
|
}
|
|
|
|
public boolean add(Player player, ItemStack item)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public boolean remove(Player player, ItemStack item)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public void openInventory(Player player)
|
|
{
|
|
this.inventoryManager.openCustomInventory(player);
|
|
}
|
|
}
|