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);
}
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);
}
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);
}
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);
}
Aggregations