Search in sources :

Example 1 with SettingsManager

use of com.eintosti.buildsystem.manager.SettingsManager in project BuildSystem by einTosti.

the class BuildSystem method initClasses.

private void initClasses() {
    this.armorStandManager = new ArmorStandManager();
    this.playerManager = new PlayerManager(this);
    this.inventoryManager = new InventoryManager(this);
    this.inventoryManager.loadTypes();
    this.inventoryManager.loadStatus();
    this.noClipManager = new NoClipManager(this);
    this.worldManager = new WorldManager(this);
    this.settingsManager = new SettingsManager(this);
    this.spawnManager = new SpawnManager(this);
    this.archiveInventory = new ArchiveInventory(this);
    this.blocksInventory = new BlocksInventory(this);
    this.builderInventory = new BuilderInventory(this);
    this.createInventory = new CreateInventory(this);
    this.deleteInventory = new DeleteInventory(this);
    this.designInventory = new DesignInventory(this);
    this.editInventory = new EditInventory(this);
    this.gameRuleInventory = new GameRuleInventory(this);
    this.navigatorInventory = new NavigatorInventory(this);
    this.privateInventory = new PrivateInventory(this);
    this.settingsInventory = new SettingsInventory(this);
    this.setupInventory = new SetupInventory(this);
    this.speedInventory = new SpeedInventory(this);
    this.statusInventory = new StatusInventory(this);
    this.worldsInventory = new WorldsInventory(this);
    this.skullCache = new SkullCache(version);
}
Also used : ArmorStandManager(com.eintosti.buildsystem.manager.ArmorStandManager) PlayerManager(com.eintosti.buildsystem.manager.PlayerManager) SettingsManager(com.eintosti.buildsystem.manager.SettingsManager) WorldManager(com.eintosti.buildsystem.manager.WorldManager) InventoryManager(com.eintosti.buildsystem.manager.InventoryManager) SkullCache(com.eintosti.buildsystem.util.SkullCache) NoClipManager(com.eintosti.buildsystem.manager.NoClipManager) SpawnManager(com.eintosti.buildsystem.manager.SpawnManager)

Example 2 with SettingsManager

use of com.eintosti.buildsystem.manager.SettingsManager in project BuildSystem by Trichtern.

the class DesignInventory method setItem.

private void setItem(Player player, Inventory inventory, int position, XMaterial material, String displayName, Color color) {
    SettingsManager settingsManager = plugin.getSettingsManager();
    Settings settings = settingsManager.getSettings(player);
    ItemStack itemStack = inventoryManager.getItemStack(material, settings.getGlassColor() == color ? "§a" + displayName : "§7" + displayName);
    ItemMeta itemMeta = itemStack.getItemMeta();
    if (itemMeta != null) {
        itemMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
    }
    itemStack.setItemMeta(itemMeta);
    if (settings.getGlassColor() == color) {
        itemStack.addUnsafeEnchantment(Enchantment.DURABILITY, 1);
    }
    inventory.setItem(position, itemStack);
}
Also used : SettingsManager(com.eintosti.buildsystem.manager.SettingsManager) ItemStack(org.bukkit.inventory.ItemStack) Settings(com.eintosti.buildsystem.object.settings.Settings) ItemMeta(org.bukkit.inventory.meta.ItemMeta)

Example 3 with SettingsManager

use of com.eintosti.buildsystem.manager.SettingsManager in project BuildSystem by Trichtern.

the class BuildSystem method initClasses.

private void initClasses() {
    this.armorStandManager = new ArmorStandManager();
    this.playerManager = new PlayerManager(this);
    this.inventoryManager = new InventoryManager(this);
    this.inventoryManager.loadTypes();
    this.inventoryManager.loadStatus();
    this.noClipManager = new NoClipManager(this);
    this.worldManager = new WorldManager(this);
    this.settingsManager = new SettingsManager(this);
    this.spawnManager = new SpawnManager(this);
    this.archiveInventory = new ArchiveInventory(this);
    this.blocksInventory = new BlocksInventory(this);
    this.builderInventory = new BuilderInventory(this);
    this.createInventory = new CreateInventory(this);
    this.deleteInventory = new DeleteInventory(this);
    this.designInventory = new DesignInventory(this);
    this.editInventory = new EditInventory(this);
    this.gameRuleInventory = new GameRuleInventory(this);
    this.navigatorInventory = new NavigatorInventory(this);
    this.privateInventory = new PrivateInventory(this);
    this.settingsInventory = new SettingsInventory(this);
    this.setupInventory = new SetupInventory(this);
    this.speedInventory = new SpeedInventory(this);
    this.statusInventory = new StatusInventory(this);
    this.worldsInventory = new WorldsInventory(this);
    this.skullCache = new SkullCache(version);
}
Also used : ArmorStandManager(com.eintosti.buildsystem.manager.ArmorStandManager) PlayerManager(com.eintosti.buildsystem.manager.PlayerManager) SettingsManager(com.eintosti.buildsystem.manager.SettingsManager) WorldManager(com.eintosti.buildsystem.manager.WorldManager) InventoryManager(com.eintosti.buildsystem.manager.InventoryManager) SkullCache(com.eintosti.buildsystem.util.SkullCache) NoClipManager(com.eintosti.buildsystem.manager.NoClipManager) SpawnManager(com.eintosti.buildsystem.manager.SpawnManager)

Example 4 with SettingsManager

use of com.eintosti.buildsystem.manager.SettingsManager in project BuildSystem by einTosti.

the class DesignInventory method setItem.

private void setItem(Player player, Inventory inventory, int position, XMaterial material, String displayName, Color color) {
    SettingsManager settingsManager = plugin.getSettingsManager();
    Settings settings = settingsManager.getSettings(player);
    ItemStack itemStack = inventoryManager.getItemStack(material, settings.getGlassColor() == color ? "§a" + displayName : "§7" + displayName);
    ItemMeta itemMeta = itemStack.getItemMeta();
    if (itemMeta != null) {
        itemMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
    }
    itemStack.setItemMeta(itemMeta);
    if (settings.getGlassColor() == color) {
        itemStack.addUnsafeEnchantment(Enchantment.DURABILITY, 1);
    }
    inventory.setItem(position, itemStack);
}
Also used : SettingsManager(com.eintosti.buildsystem.manager.SettingsManager) ItemStack(org.bukkit.inventory.ItemStack) Settings(com.eintosti.buildsystem.object.settings.Settings) ItemMeta(org.bukkit.inventory.meta.ItemMeta)

Aggregations

SettingsManager (com.eintosti.buildsystem.manager.SettingsManager)4 ArmorStandManager (com.eintosti.buildsystem.manager.ArmorStandManager)2 InventoryManager (com.eintosti.buildsystem.manager.InventoryManager)2 NoClipManager (com.eintosti.buildsystem.manager.NoClipManager)2 PlayerManager (com.eintosti.buildsystem.manager.PlayerManager)2 SpawnManager (com.eintosti.buildsystem.manager.SpawnManager)2 WorldManager (com.eintosti.buildsystem.manager.WorldManager)2 Settings (com.eintosti.buildsystem.object.settings.Settings)2 SkullCache (com.eintosti.buildsystem.util.SkullCache)2 ItemStack (org.bukkit.inventory.ItemStack)2 ItemMeta (org.bukkit.inventory.meta.ItemMeta)2