Package com.sk89q.craftbook.util

Examples of com.sk89q.craftbook.util.ItemInfo


            InventoryHolder c = (InventoryHolder) bl.getState();
            for (int i = 0; i < c.getInventory().getSize(); i++) {
                ItemStack it = c.getInventory().getItem(i);
                if (ItemUtil.isStackValid(it)) {

                    if(((Factory)getFactory()).blacklist.contains(new ItemInfo(it)))
                        continue;
                    int amount = it.getAmount();
                    if (it.getAmount() < 64) {

                        int missing = 0;
View Full Code Here


                x = Double.parseDouble(bits[0]);
                y = Double.parseDouble(bits[1]);
                z = Double.parseDouble(bits[2]);
            }

            ItemInfo block = new ItemInfo(key);

            autoBouncers.put(block, new Vector(x,y,z));
        }
    }
View Full Code Here

    @Override
    public void loadConfiguration (YAMLProcessor config, String path) {

        config.setComment(path + "glowstone-off-block", "Sets the block that the redstone glowstone mechanic turns into when turned off.");
        offBlock = new ItemInfo(config.getString(path + "glowstone-off-block", "GLASS"));
    }
View Full Code Here

                EntityType ent = EntityType.valueOf(config.getString("custom-drops." + key + ".entity-type"));

                def = new EntityCustomDropDefinition(key, drops, rewards, ent);
            } else if(type.equalsIgnoreCase("block")) {

                ItemInfo data = new ItemInfo(config.getString("custom-drops." + key + ".block"));

                def = new BlockCustomDropDefinition(key, drops, rewards, data);
            }

            if(def != null) {
View Full Code Here

    @Override
    public void loadConfiguration (YAMLProcessor config, String path) {

        config.setComment(path + "item", "Set the item that is the ammeter tool.");
        item = new ItemInfo(config.getString(path + "item", "COAL"));
    }
View Full Code Here

    @Override
    public void loadConfiguration (YAMLProcessor config, String path) {

        config.setComment(path + "item", "The item the Sign Copy mechanic uses.");
        item = new ItemInfo(config.getString(path + "item", "INK_SACK:0"));
    }
View Full Code Here

                                stacks.add(nstack);
                                if(dd.append)
                                    append = true;
                            }

                            BlockCustomDropDefinition converted = new BlockCustomDropDefinition(sourceId + "" + data + "" + this.converted++,stacks, null, new ItemInfo(sourceId, data));
                            converted.setAppend(append);

                            ((CustomDrops) CraftBookPlugin.inst().getMechanic(CustomDrops.class)).addDefinition(converted);
                        } else {
                            itemsSource = ChatColor.translateAlternateColorCodes('&', itemsSource.toLowerCase(Locale.ENGLISH));
View Full Code Here

        when(block.getType()).thenReturn(Material.LOG);
        when(block.getData()).thenReturn((byte) 0);
        when(block.getLocation()).thenReturn(new Location(world, 64,64,64));

        lopper.enabledBlocks = new ArrayList<ItemInfo>();
        lopper.enabledBlocks.add(new ItemInfo(Material.LOG, 0));

        lopper.enabledItems = new ArrayList<ItemInfo>();
        lopper.enabledItems.add(new ItemInfo(Material.DIAMOND_AXE, -1));

        getConfig().showPermissionMessages = true;

        when(CraftBookPlugin.inst().hasPermission(Matchers.<CommandSender>any(), Matchers.anyString())).thenReturn(false);
View Full Code Here

TOP

Related Classes of com.sk89q.craftbook.util.ItemInfo

Copyright © 2018 www.massapicom. 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.