Examples of dropItemNaturally()


Examples of org.bukkit.World.dropItemNaturally()

    @Override
    public void dropItem(Vector pt, BaseItemStack item) {
        World world = getWorld();
        ItemStack bukkitItem = new ItemStack(item.getType(), item.getAmount(),
                item.getData());
        world.dropItemNaturally(BukkitUtil.toLocation(world, pt), bukkitItem);
    }

    @SuppressWarnings("deprecation")
    @Override
    public boolean isValidBlockType(int type) {
View Full Code Here

Examples of org.bukkit.World.dropItemNaturally()

        {
            World w = getWorld();
            Location loc = getLocation();
            for (ItemStack st : ((InventoryHolder) blockState).getInventory().getContents())
                if (st != null)
                    w.dropItemNaturally(loc, st);
        }
        ((InventoryHolder) blockState).getInventory().clear();
        getBlock().setType(Material.AIR);
        if (neighbor != null)
            neighbor.getBlock().setType(Material.AIR);
View Full Code Here

Examples of org.bukkit.World.dropItemNaturally()

            Location loc = blockState.getBlock().getLocation();
            World w = loc.getWorld();

            Collection<ItemStack> drop = blockState.getBlock().getDrops();
            for (ItemStack s : drop)
                w.dropItemNaturally(loc, s);
            return true;
        }
        return false;
    }
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.