Examples of AlchemyPotion


Examples of com.gmail.nossr50.datatypes.skills.alchemy.AlchemyPotion

        ConfigurationSection potionSection = config.getConfigurationSection("Potions");
        int pass = 0;
        int fail = 0;

        for (String dataValue : potionSection.getKeys(false)) {
            AlchemyPotion potion = loadPotion(potionSection.getConfigurationSection(dataValue));

            if (potion != null) {
                potionMap.put(potion.getDataValue(), potion);
                pass++;
            }
            else {
                fail++;
            }
View Full Code Here

Examples of com.gmail.nossr50.datatypes.skills.alchemy.AlchemyPotion

                        mcMMO.p.getLogger().warning("Failed to parse child for potion " + name + ": " + child);
                    }
                }
            }

            return new AlchemyPotion(dataValue, name, lore, effects, children);
        }
        catch (Exception e) {
            mcMMO.p.getLogger().warning("Failed to load Alchemy potion: " + potion_section.getName());
            return null;
        }
View Full Code Here

Examples of com.gmail.nossr50.datatypes.skills.alchemy.AlchemyPotion

            if (isEmpty(item) || item.getType() == Material.GLASS_BOTTLE || !PotionConfig.getInstance().isValidPotion(item)) {
                continue;
            }

            AlchemyPotion input = PotionConfig.getInstance().getPotion(item.getDurability());
            AlchemyPotion output = PotionConfig.getInstance().getPotion(input.getChildDataValue(ingredient));

            inputList.add(input);

            if (output != null) {
                inventory.setItem(i, output.toItemStack(item.getAmount()).clone());
            }
        }

        FakeBrewEvent event = new FakeBrewEvent(brewingStand.getBlock(), inventory);
        mcMMO.p.getServer().getPluginManager().callEvent(event);

        if (event.isCancelled() || inputList.isEmpty()) {
            return;
        }

        for (AlchemyPotion input : inputList) {
            AlchemyPotion output = PotionConfig.getInstance().getPotion(input.getChildDataValue(ingredient));

            if (output != null && player != null) {
                PotionStage potionStage = PotionStage.getPotionStage(input, output);

                if (UserManager.hasPlayerDataKey(player)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.